diff --git a/contracts/gas-snapshots/ccip.gas-snapshot b/contracts/gas-snapshots/ccip.gas-snapshot index ef8cca5a52..a3cdd77b36 100644 --- a/contracts/gas-snapshots/ccip.gas-snapshot +++ b/contracts/gas-snapshots/ccip.gas-snapshot @@ -8,11 +8,11 @@ ARMProxyTest:test_ARMIsCursed_Success() (gas: 49740) AggregateTokenLimiter_constructor:test_Constructor_Success() (gas: 26920) AggregateTokenLimiter_getTokenBucket:test_GetTokenBucket_Success() (gas: 19691) AggregateTokenLimiter_getTokenBucket:test_Refill_Success() (gas: 40911) -AggregateTokenLimiter_getTokenBucket:test_TimeUnderflow_Revert() (gas: 15353) +AggregateTokenLimiter_getTokenBucket:test_TimeUnderflow_Revert() (gas: 15368) AggregateTokenLimiter_getTokenLimitAdmin:test_GetTokenLimitAdmin_Success() (gas: 10531) -AggregateTokenLimiter_getTokenValue:test_GetTokenValue_Success() (gas: 19623) -AggregateTokenLimiter_getTokenValue:test_NoTokenPrice_Reverts() (gas: 21208) -AggregateTokenLimiter_rateLimitValue:test_AggregateValueMaxCapacityExceeded_Revert() (gas: 16403) +AggregateTokenLimiter_getTokenValue:test_GetTokenValue_Success() (gas: 19696) +AggregateTokenLimiter_getTokenValue:test_NoTokenPrice_Reverts() (gas: 21281) +AggregateTokenLimiter_rateLimitValue:test_AggregateValueMaxCapacityExceeded_Revert() (gas: 16418) AggregateTokenLimiter_rateLimitValue:test_RateLimitValueSuccess_gas() (gas: 18306) AggregateTokenLimiter_setAdmin:test_OnlyOwnerOrAdmin_Revert() (gas: 13047) AggregateTokenLimiter_setAdmin:test_Owner_Success() (gas: 18989) @@ -34,7 +34,7 @@ BurnWithFromMintTokenPool_lockOrBurn:test_ChainNotAllowed_Revert() (gas: 28675) BurnWithFromMintTokenPool_lockOrBurn:test_PoolBurnRevertNotHealthy_Revert() (gas: 55158) BurnWithFromMintTokenPool_lockOrBurn:test_PoolBurn_Success() (gas: 243568) BurnWithFromMintTokenPool_lockOrBurn:test_Setup_Success() (gas: 24260) -CCIPClientExample_sanity:test_ImmutableExamples_Success() (gas: 2132183) +CCIPClientExample_sanity:test_ImmutableExamples_Success() (gas: 2132362) CCIPConfigSetup:test_getCapabilityConfiguration_Success() (gas: 9495) CCIPConfig_ConfigStateMachine:test__computeConfigDigest_Success() (gas: 70755) CCIPConfig_ConfigStateMachine:test__computeNewConfigWithMeta_InitToRunning_Success() (gas: 363647) @@ -95,16 +95,16 @@ CommitStore_isUnpausedAndRMNHealthy:test_RMN_Success() (gas: 73420) CommitStore_report:test_InvalidIntervalMinLargerThanMax_Revert() (gas: 28670) CommitStore_report:test_InvalidInterval_Revert() (gas: 28610) CommitStore_report:test_InvalidRootRevert() (gas: 27843) -CommitStore_report:test_OnlyGasPriceUpdates_Success() (gas: 55405) -CommitStore_report:test_OnlyPriceUpdateStaleReport_Revert() (gas: 61201) -CommitStore_report:test_OnlyTokenPriceUpdates_Success() (gas: 55403) +CommitStore_report:test_OnlyGasPriceUpdates_Success() (gas: 55414) +CommitStore_report:test_OnlyPriceUpdateStaleReport_Revert() (gas: 61210) +CommitStore_report:test_OnlyTokenPriceUpdates_Success() (gas: 55412) CommitStore_report:test_Paused_Revert() (gas: 21259) -CommitStore_report:test_ReportAndPriceUpdate_Success() (gas: 86394) +CommitStore_report:test_ReportAndPriceUpdate_Success() (gas: 86403) CommitStore_report:test_ReportOnlyRootSuccess_gas() (gas: 56313) CommitStore_report:test_RootAlreadyCommitted_Revert() (gas: 63969) -CommitStore_report:test_StaleReportWithRoot_Success() (gas: 119274) +CommitStore_report:test_StaleReportWithRoot_Success() (gas: 119420) CommitStore_report:test_Unhealthy_Revert() (gas: 44751) -CommitStore_report:test_ValidPriceUpdateThenStaleReportWithRoot_Success() (gas: 102837) +CommitStore_report:test_ValidPriceUpdateThenStaleReportWithRoot_Success() (gas: 102919) CommitStore_report:test_ZeroEpochAndRound_Revert() (gas: 27626) CommitStore_resetUnblessedRoots:test_OnlyOwner_Revert() (gas: 11325) CommitStore_resetUnblessedRoots:test_ResetUnblessedRoots_Success() (gas: 143718) @@ -120,82 +120,82 @@ CommitStore_verify:test_Paused_Revert() (gas: 18496) CommitStore_verify:test_TooManyLeaves_Revert() (gas: 36785) DefensiveExampleTest:test_HappyPath_Success() (gas: 200018) DefensiveExampleTest:test_Recovery() (gas: 424253) -E2E:test_E2E_3MessagesSuccess_gas() (gas: 1104821) -EVM2EVMMultiOffRamp__releaseOrMintSingleToken:test__releaseOrMintSingleToken_NotACompatiblePool_Revert() (gas: 38220) -EVM2EVMMultiOffRamp__releaseOrMintSingleToken:test__releaseOrMintSingleToken_Success() (gas: 108400) -EVM2EVMMultiOffRamp__releaseOrMintSingleToken:test__releaseOrMintSingleToken_TokenHandlingError_revert_Revert() (gas: 116868) -EVM2EVMMultiOffRamp_applySourceChainConfigUpdates:test_AddMultipleChains_Success() (gas: 460557) -EVM2EVMMultiOffRamp_applySourceChainConfigUpdates:test_AddNewChain_Success() (gas: 95536) -EVM2EVMMultiOffRamp_applySourceChainConfigUpdates:test_ApplyZeroUpdates_Success() (gas: 12460) -EVM2EVMMultiOffRamp_applySourceChainConfigUpdates:test_ReplaceExistingChainOnRamp_Revert() (gas: 90379) -EVM2EVMMultiOffRamp_applySourceChainConfigUpdates:test_ReplaceExistingChain_Success() (gas: 105577) -EVM2EVMMultiOffRamp_applySourceChainConfigUpdates:test_ZeroOnRampAddress_Revert() (gas: 15716) -EVM2EVMMultiOffRamp_applySourceChainConfigUpdates:test_ZeroSourceChainSelector_Revert() (gas: 13054) -EVM2EVMMultiOffRamp_batchExecute:test_MultipleReportsDifferentChains_Success() (gas: 298930) -EVM2EVMMultiOffRamp_batchExecute:test_MultipleReportsSameChain_Success() (gas: 240268) -EVM2EVMMultiOffRamp_batchExecute:test_MultipleReportsSkipDuplicate_Success() (gas: 158987) -EVM2EVMMultiOffRamp_batchExecute:test_OutOfBoundsGasLimitsAccess_Revert() (gas: 189548) +E2E:test_E2E_3MessagesSuccess_gas() (gas: 1105562) +EVM2EVMMultiOffRamp__releaseOrMintSingleToken:test__releaseOrMintSingleToken_NotACompatiblePool_Revert() (gas: 38205) +EVM2EVMMultiOffRamp__releaseOrMintSingleToken:test__releaseOrMintSingleToken_Success() (gas: 108403) +EVM2EVMMultiOffRamp__releaseOrMintSingleToken:test__releaseOrMintSingleToken_TokenHandlingError_revert_Revert() (gas: 116871) +EVM2EVMMultiOffRamp_applySourceChainConfigUpdates:test_AddMultipleChains_Success() (gas: 460560) +EVM2EVMMultiOffRamp_applySourceChainConfigUpdates:test_AddNewChain_Success() (gas: 95542) +EVM2EVMMultiOffRamp_applySourceChainConfigUpdates:test_ApplyZeroUpdates_Success() (gas: 12463) +EVM2EVMMultiOffRamp_applySourceChainConfigUpdates:test_ReplaceExistingChainOnRamp_Revert() (gas: 90385) +EVM2EVMMultiOffRamp_applySourceChainConfigUpdates:test_ReplaceExistingChain_Success() (gas: 105586) +EVM2EVMMultiOffRamp_applySourceChainConfigUpdates:test_ZeroOnRampAddress_Revert() (gas: 15719) +EVM2EVMMultiOffRamp_applySourceChainConfigUpdates:test_ZeroSourceChainSelector_Revert() (gas: 13057) +EVM2EVMMultiOffRamp_batchExecute:test_MultipleReportsDifferentChains_Success() (gas: 298927) +EVM2EVMMultiOffRamp_batchExecute:test_MultipleReportsSameChain_Success() (gas: 240262) +EVM2EVMMultiOffRamp_batchExecute:test_MultipleReportsSkipDuplicate_Success() (gas: 158984) +EVM2EVMMultiOffRamp_batchExecute:test_OutOfBoundsGasLimitsAccess_Revert() (gas: 189545) EVM2EVMMultiOffRamp_batchExecute:test_SingleReport_Success() (gas: 147703) EVM2EVMMultiOffRamp_batchExecute:test_Unhealthy_Revert() (gas: 521990) -EVM2EVMMultiOffRamp_batchExecute:test_ZeroReports_Revert() (gas: 10456) -EVM2EVMMultiOffRamp_ccipReceive:test_Reverts() (gas: 15659) -EVM2EVMMultiOffRamp_commit:test_InvalidIntervalMinLargerThanMax_Revert() (gas: 67189) -EVM2EVMMultiOffRamp_commit:test_InvalidInterval_Revert() (gas: 59695) -EVM2EVMMultiOffRamp_commit:test_InvalidRootRevert() (gas: 58775) -EVM2EVMMultiOffRamp_commit:test_NoConfigWithOtherConfigPresent_Revert() (gas: 6544263) -EVM2EVMMultiOffRamp_commit:test_NoConfig_Revert() (gas: 6127493) -EVM2EVMMultiOffRamp_commit:test_OnlyGasPriceUpdates_Success() (gas: 108372) -EVM2EVMMultiOffRamp_commit:test_OnlyPriceUpdateStaleReport_Revert() (gas: 118374) -EVM2EVMMultiOffRamp_commit:test_OnlyTokenPriceUpdates_Success() (gas: 108415) -EVM2EVMMultiOffRamp_commit:test_PriceSequenceNumberCleared_Success() (gas: 353706) -EVM2EVMMultiOffRamp_commit:test_ReportAndPriceUpdate_Success() (gas: 161272) -EVM2EVMMultiOffRamp_commit:test_ReportOnlyRootSuccess_gas() (gas: 136244) -EVM2EVMMultiOffRamp_commit:test_RootAlreadyCommitted_Revert() (gas: 136825) -EVM2EVMMultiOffRamp_commit:test_SourceChainNotEnabled_Revert() (gas: 59043) -EVM2EVMMultiOffRamp_commit:test_StaleReportWithRoot_Success() (gas: 227655) -EVM2EVMMultiOffRamp_commit:test_UnauthorizedTransmitter_Revert() (gas: 119676) -EVM2EVMMultiOffRamp_commit:test_Unhealthy_Revert() (gas: 77602) -EVM2EVMMultiOffRamp_commit:test_ValidPriceUpdateThenStaleReportWithRoot_Success() (gas: 209115) -EVM2EVMMultiOffRamp_commit:test_WrongConfigWithoutSigners_Revert() (gas: 6538652) -EVM2EVMMultiOffRamp_commit:test_ZeroEpochAndRound_Revert() (gas: 47782) -EVM2EVMMultiOffRamp_constructor:test_Constructor_Success() (gas: 6127677) +EVM2EVMMultiOffRamp_batchExecute:test_ZeroReports_Revert() (gas: 10459) +EVM2EVMMultiOffRamp_ccipReceive:test_Reverts() (gas: 15662) +EVM2EVMMultiOffRamp_commit:test_InvalidIntervalMinLargerThanMax_Revert() (gas: 67195) +EVM2EVMMultiOffRamp_commit:test_InvalidInterval_Revert() (gas: 59698) +EVM2EVMMultiOffRamp_commit:test_InvalidRootRevert() (gas: 58778) +EVM2EVMMultiOffRamp_commit:test_NoConfigWithOtherConfigPresent_Revert() (gas: 6544291) +EVM2EVMMultiOffRamp_commit:test_NoConfig_Revert() (gas: 6127518) +EVM2EVMMultiOffRamp_commit:test_OnlyGasPriceUpdates_Success() (gas: 108390) +EVM2EVMMultiOffRamp_commit:test_OnlyPriceUpdateStaleReport_Revert() (gas: 118389) +EVM2EVMMultiOffRamp_commit:test_OnlyTokenPriceUpdates_Success() (gas: 108433) +EVM2EVMMultiOffRamp_commit:test_PriceSequenceNumberCleared_Success() (gas: 353736) +EVM2EVMMultiOffRamp_commit:test_ReportAndPriceUpdate_Success() (gas: 161293) +EVM2EVMMultiOffRamp_commit:test_ReportOnlyRootSuccess_gas() (gas: 136253) +EVM2EVMMultiOffRamp_commit:test_RootAlreadyCommitted_Revert() (gas: 136831) +EVM2EVMMultiOffRamp_commit:test_SourceChainNotEnabled_Revert() (gas: 59046) +EVM2EVMMultiOffRamp_commit:test_StaleReportWithRoot_Success() (gas: 227807) +EVM2EVMMultiOffRamp_commit:test_UnauthorizedTransmitter_Revert() (gas: 119688) +EVM2EVMMultiOffRamp_commit:test_Unhealthy_Revert() (gas: 77605) +EVM2EVMMultiOffRamp_commit:test_ValidPriceUpdateThenStaleReportWithRoot_Success() (gas: 209218) +EVM2EVMMultiOffRamp_commit:test_WrongConfigWithoutSigners_Revert() (gas: 6538680) +EVM2EVMMultiOffRamp_commit:test_ZeroEpochAndRound_Revert() (gas: 47785) +EVM2EVMMultiOffRamp_constructor:test_Constructor_Success() (gas: 6127725) EVM2EVMMultiOffRamp_constructor:test_SourceChainSelector_Revert() (gas: 104335) EVM2EVMMultiOffRamp_constructor:test_ZeroChainSelector_Revert() (gas: 100260) EVM2EVMMultiOffRamp_constructor:test_ZeroNonceManager_Revert() (gas: 98131) EVM2EVMMultiOffRamp_constructor:test_ZeroOnRampAddress_Revert() (gas: 106841) EVM2EVMMultiOffRamp_constructor:test_ZeroRMNProxy_Revert() (gas: 98030) EVM2EVMMultiOffRamp_constructor:test_ZeroTokenAdminRegistry_Revert() (gas: 98097) -EVM2EVMMultiOffRamp_execute:test_IncorrectArrayType_Revert() (gas: 17277) -EVM2EVMMultiOffRamp_execute:test_LargeBatch_Success() (gas: 1563033) -EVM2EVMMultiOffRamp_execute:test_MultipleReportsWithPartialValidationFailures_Success() (gas: 343670) -EVM2EVMMultiOffRamp_execute:test_MultipleReports_Success() (gas: 260538) -EVM2EVMMultiOffRamp_execute:test_NoConfigWithOtherConfigPresent_Revert() (gas: 6594735) -EVM2EVMMultiOffRamp_execute:test_NoConfig_Revert() (gas: 6177684) -EVM2EVMMultiOffRamp_execute:test_NonArray_Revert() (gas: 27678) -EVM2EVMMultiOffRamp_execute:test_SingleReport_Success() (gas: 165299) -EVM2EVMMultiOffRamp_execute:test_UnauthorizedTransmitter_Revert() (gas: 149255) -EVM2EVMMultiOffRamp_execute:test_WrongConfigWithSigners_Revert() (gas: 6956810) -EVM2EVMMultiOffRamp_execute:test_ZeroReports_Revert() (gas: 17151) +EVM2EVMMultiOffRamp_execute:test_IncorrectArrayType_Revert() (gas: 17280) +EVM2EVMMultiOffRamp_execute:test_LargeBatch_Success() (gas: 1563036) +EVM2EVMMultiOffRamp_execute:test_MultipleReportsWithPartialValidationFailures_Success() (gas: 343697) +EVM2EVMMultiOffRamp_execute:test_MultipleReports_Success() (gas: 260541) +EVM2EVMMultiOffRamp_execute:test_NoConfigWithOtherConfigPresent_Revert() (gas: 6594757) +EVM2EVMMultiOffRamp_execute:test_NoConfig_Revert() (gas: 6177703) +EVM2EVMMultiOffRamp_execute:test_NonArray_Revert() (gas: 27681) +EVM2EVMMultiOffRamp_execute:test_SingleReport_Success() (gas: 165302) +EVM2EVMMultiOffRamp_execute:test_UnauthorizedTransmitter_Revert() (gas: 149258) +EVM2EVMMultiOffRamp_execute:test_WrongConfigWithSigners_Revert() (gas: 6956832) +EVM2EVMMultiOffRamp_execute:test_ZeroReports_Revert() (gas: 17154) EVM2EVMMultiOffRamp_executeSingleMessage:test_MessageSender_Revert() (gas: 18413) EVM2EVMMultiOffRamp_executeSingleMessage:test_NonContractWithTokens_Success() (gas: 249488) EVM2EVMMultiOffRamp_executeSingleMessage:test_NonContract_Success() (gas: 20672) EVM2EVMMultiOffRamp_executeSingleMessage:test_TokenHandlingError_Revert() (gas: 201787) EVM2EVMMultiOffRamp_executeSingleMessage:test_ZeroGasDONExecution_Revert() (gas: 48860) EVM2EVMMultiOffRamp_executeSingleMessage:test_executeSingleMessage_NoTokens_Success() (gas: 48381) -EVM2EVMMultiOffRamp_executeSingleMessage:test_executeSingleMessage_WithFailingValidationNoRouterCall_Revert() (gas: 232668) -EVM2EVMMultiOffRamp_executeSingleMessage:test_executeSingleMessage_WithFailingValidation_Revert() (gas: 89262) -EVM2EVMMultiOffRamp_executeSingleMessage:test_executeSingleMessage_WithTokens_Success() (gas: 278263) -EVM2EVMMultiOffRamp_executeSingleMessage:test_executeSingleMessage_WithValidation_Success() (gas: 93485) +EVM2EVMMultiOffRamp_executeSingleMessage:test_executeSingleMessage_WithFailingValidationNoRouterCall_Revert() (gas: 232695) +EVM2EVMMultiOffRamp_executeSingleMessage:test_executeSingleMessage_WithFailingValidation_Revert() (gas: 89289) +EVM2EVMMultiOffRamp_executeSingleMessage:test_executeSingleMessage_WithTokens_Success() (gas: 278266) +EVM2EVMMultiOffRamp_executeSingleMessage:test_executeSingleMessage_WithValidation_Success() (gas: 93512) EVM2EVMMultiOffRamp_executeSingleReport:test_DisabledSourceChain_Revert() (gas: 35083) -EVM2EVMMultiOffRamp_executeSingleReport:test_EmptyReport_Revert() (gas: 23910) +EVM2EVMMultiOffRamp_executeSingleReport:test_EmptyReport_Revert() (gas: 23907) EVM2EVMMultiOffRamp_executeSingleReport:test_InvalidSourcePoolAddress_Success() (gas: 451951) -EVM2EVMMultiOffRamp_executeSingleReport:test_ManualExecutionNotYetEnabled_Revert() (gas: 54472) +EVM2EVMMultiOffRamp_executeSingleReport:test_ManualExecutionNotYetEnabled_Revert() (gas: 54475) EVM2EVMMultiOffRamp_executeSingleReport:test_MismatchingDestChainSelector_Revert() (gas: 35906) -EVM2EVMMultiOffRamp_executeSingleReport:test_MismatchingOnRampRoot_Revert() (gas: 154363) +EVM2EVMMultiOffRamp_executeSingleReport:test_MismatchingOnRampRoot_Revert() (gas: 154369) EVM2EVMMultiOffRamp_executeSingleReport:test_NonExistingSourceChain_Revert() (gas: 35317) -EVM2EVMMultiOffRamp_executeSingleReport:test_ReceiverError_Success() (gas: 181628) +EVM2EVMMultiOffRamp_executeSingleReport:test_ReceiverError_Success() (gas: 181634) EVM2EVMMultiOffRamp_executeSingleReport:test_RetryFailedMessageWithoutManualExecution_Revert() (gas: 190908) -EVM2EVMMultiOffRamp_executeSingleReport:test_RootNotCommitted_Revert() (gas: 48050) +EVM2EVMMultiOffRamp_executeSingleReport:test_RootNotCommitted_Revert() (gas: 48053) EVM2EVMMultiOffRamp_executeSingleReport:test_RouterYULCall_Revert() (gas: 436547) EVM2EVMMultiOffRamp_executeSingleReport:test_SingleMessageNoTokensOtherChain_Success() (gas: 252012) EVM2EVMMultiOffRamp_executeSingleReport:test_SingleMessageNoTokensUnordered_Success() (gas: 174226) @@ -205,7 +205,7 @@ EVM2EVMMultiOffRamp_executeSingleReport:test_SingleMessagesNoTokensSuccess_gas() EVM2EVMMultiOffRamp_executeSingleReport:test_SkippedIncorrectNonceStillExecutes_Success() (gas: 391966) EVM2EVMMultiOffRamp_executeSingleReport:test_SkippedIncorrectNonce_Success() (gas: 65914) EVM2EVMMultiOffRamp_executeSingleReport:test_TokenDataMismatch_Revert() (gas: 80970) -EVM2EVMMultiOffRamp_executeSingleReport:test_TwoMessagesWithTokensAndGE_Success() (gas: 535883) +EVM2EVMMultiOffRamp_executeSingleReport:test_TwoMessagesWithTokensAndGE_Success() (gas: 535889) EVM2EVMMultiOffRamp_executeSingleReport:test_TwoMessagesWithTokensSuccess_gas() (gas: 480816) EVM2EVMMultiOffRamp_executeSingleReport:test_UnexpectedTokenData_Revert() (gas: 35763) EVM2EVMMultiOffRamp_executeSingleReport:test_UnhealthySingleChainCurse_Revert() (gas: 520826) @@ -213,30 +213,30 @@ EVM2EVMMultiOffRamp_executeSingleReport:test_Unhealthy_Revert() (gas: 518194) EVM2EVMMultiOffRamp_executeSingleReport:test_WithCurseOnAnotherSourceChain_Success() (gas: 488330) EVM2EVMMultiOffRamp_executeSingleReport:test__execute_SkippedAlreadyExecutedMessageUnordered_Success() (gas: 128053) EVM2EVMMultiOffRamp_executeSingleReport:test__execute_SkippedAlreadyExecutedMessage_Success() (gas: 157265) -EVM2EVMMultiOffRamp_getExecutionState:test_FillExecutionState_Success() (gas: 3650714) -EVM2EVMMultiOffRamp_getExecutionState:test_GetDifferentChainExecutionState_Success() (gas: 118188) -EVM2EVMMultiOffRamp_getExecutionState:test_GetExecutionState_Success() (gas: 87407) -EVM2EVMMultiOffRamp_manuallyExecute:test_ManualExecGasLimitMismatchSingleReport_Revert() (gas: 75594) +EVM2EVMMultiOffRamp_getExecutionState:test_FillExecutionState_Success() (gas: 3655340) +EVM2EVMMultiOffRamp_getExecutionState:test_GetDifferentChainExecutionState_Success() (gas: 118224) +EVM2EVMMultiOffRamp_getExecutionState:test_GetExecutionState_Success() (gas: 87461) +EVM2EVMMultiOffRamp_manuallyExecute:test_ManualExecGasLimitMismatchSingleReport_Revert() (gas: 75600) EVM2EVMMultiOffRamp_manuallyExecute:test_ManualExecInvalidGasLimit_Revert() (gas: 26473) EVM2EVMMultiOffRamp_manuallyExecute:test_manuallyExecute_DoesNotRevertIfUntouched_Success() (gas: 163355) EVM2EVMMultiOffRamp_manuallyExecute:test_manuallyExecute_FailedTx_Revert() (gas: 207956) -EVM2EVMMultiOffRamp_manuallyExecute:test_manuallyExecute_ForkedChain_Revert() (gas: 26001) -EVM2EVMMultiOffRamp_manuallyExecute:test_manuallyExecute_GasLimitMismatchMultipleReports_Revert() (gas: 152913) +EVM2EVMMultiOffRamp_manuallyExecute:test_manuallyExecute_ForkedChain_Revert() (gas: 26004) +EVM2EVMMultiOffRamp_manuallyExecute:test_manuallyExecute_GasLimitMismatchMultipleReports_Revert() (gas: 152919) EVM2EVMMultiOffRamp_manuallyExecute:test_manuallyExecute_LowGasLimit_Success() (gas: 507883) -EVM2EVMMultiOffRamp_manuallyExecute:test_manuallyExecute_ReentrancyFails() (gas: 2308282) +EVM2EVMMultiOffRamp_manuallyExecute:test_manuallyExecute_ReentrancyFails() (gas: 2308285) EVM2EVMMultiOffRamp_manuallyExecute:test_manuallyExecute_Success() (gas: 210050) EVM2EVMMultiOffRamp_manuallyExecute:test_manuallyExecute_WithGasOverride_Success() (gas: 210613) EVM2EVMMultiOffRamp_manuallyExecute:test_manuallyExecute_WithMultiReportGasOverride_Success() (gas: 670625) EVM2EVMMultiOffRamp_manuallyExecute:test_manuallyExecute_WithPartialMessages_Success() (gas: 300122) EVM2EVMMultiOffRamp_releaseOrMintTokens:test_TokenHandlingError_Reverts() (gas: 160712) -EVM2EVMMultiOffRamp_releaseOrMintTokens:test__releaseOrMintTokens_PoolIsNotAPool_Reverts() (gas: 24152) -EVM2EVMMultiOffRamp_releaseOrMintTokens:test_releaseOrMintTokens_InvalidDataLengthReturnData_Revert() (gas: 59156) -EVM2EVMMultiOffRamp_releaseOrMintTokens:test_releaseOrMintTokens_InvalidEVMAddress_Revert() (gas: 40402) -EVM2EVMMultiOffRamp_releaseOrMintTokens:test_releaseOrMintTokens_PoolDoesNotSupportDest_Reverts() (gas: 76181) -EVM2EVMMultiOffRamp_releaseOrMintTokens:test_releaseOrMintTokens_Success() (gas: 179068) -EVM2EVMMultiOffRamp_releaseOrMintTokens:test_releaseOrMintTokens_destDenominatedDecimals_Success() (gas: 278906) -EVM2EVMMultiOffRamp_resetUnblessedRoots:test_OnlyOwner_Revert() (gas: 11376) -EVM2EVMMultiOffRamp_resetUnblessedRoots:test_ResetUnblessedRoots_Success() (gas: 215403) +EVM2EVMMultiOffRamp_releaseOrMintTokens:test__releaseOrMintTokens_PoolIsNotAPool_Reverts() (gas: 24155) +EVM2EVMMultiOffRamp_releaseOrMintTokens:test_releaseOrMintTokens_InvalidDataLengthReturnData_Revert() (gas: 59159) +EVM2EVMMultiOffRamp_releaseOrMintTokens:test_releaseOrMintTokens_InvalidEVMAddress_Revert() (gas: 40405) +EVM2EVMMultiOffRamp_releaseOrMintTokens:test_releaseOrMintTokens_PoolDoesNotSupportDest_Reverts() (gas: 76184) +EVM2EVMMultiOffRamp_releaseOrMintTokens:test_releaseOrMintTokens_Success() (gas: 179071) +EVM2EVMMultiOffRamp_releaseOrMintTokens:test_releaseOrMintTokens_destDenominatedDecimals_Success() (gas: 278901) +EVM2EVMMultiOffRamp_resetUnblessedRoots:test_OnlyOwner_Revert() (gas: 11379) +EVM2EVMMultiOffRamp_resetUnblessedRoots:test_ResetUnblessedRoots_Success() (gas: 215406) EVM2EVMMultiOffRamp_setDynamicConfig:test_NonOwner_Revert() (gas: 14289) EVM2EVMMultiOffRamp_setDynamicConfig:test_PriceRegistryZeroAddress_Revert() (gas: 11795) EVM2EVMMultiOffRamp_setDynamicConfig:test_RouterZeroAddress_Revert() (gas: 13951) @@ -246,128 +246,73 @@ EVM2EVMMultiOffRamp_trialExecute:test_RateLimitError_Success() (gas: 238383) EVM2EVMMultiOffRamp_trialExecute:test_TokenHandlingErrorIsCaught_Success() (gas: 247046) EVM2EVMMultiOffRamp_trialExecute:test_TokenPoolIsNotAContract_Success() (gas: 300337) EVM2EVMMultiOffRamp_trialExecute:test_trialExecute_Success() (gas: 280699) -EVM2EVMMultiOffRamp_verify:test_Blessed_Success() (gas: 176601) +EVM2EVMMultiOffRamp_verify:test_Blessed_Success() (gas: 176604) EVM2EVMMultiOffRamp_verify:test_NotBlessedWrongChainSelector_Success() (gas: 178672) EVM2EVMMultiOffRamp_verify:test_NotBlessed_Success() (gas: 141533) -EVM2EVMMultiOffRamp_verify:test_TooManyLeaves_Revert() (gas: 51505) -EVM2EVMMultiOnRamp_applyDestChainConfigUpdates:test_InvalidChainFamilySelector_Revert() (gas: 16764) -EVM2EVMMultiOnRamp_applyDestChainConfigUpdates:test_InvalidDestBytesOverhead_Revert() (gas: 33948) -EVM2EVMMultiOnRamp_applyDestChainConfigUpdates:test_InvalidDestChainConfigDestChainSelectorEqZero_Revert() (gas: 16639) -EVM2EVMMultiOnRamp_applyDestChainConfigUpdates:test_applyDestChainConfigUpdatesDefaultTxGasLimitEqZero_Revert() (gas: 16689) -EVM2EVMMultiOnRamp_applyDestChainConfigUpdates:test_applyDestChainConfigUpdatesZeroIntput() (gas: 12380) -EVM2EVMMultiOnRamp_applyDestChainConfigUpdates:test_applyDestChainConfigUpdates_Success() (gas: 174823) -EVM2EVMMultiOnRamp_applyPremiumMultiplierWeiPerEthUpdates:test_OnlyCallableByOwnerOrAdmin_Revert() (gas: 11427) -EVM2EVMMultiOnRamp_applyPremiumMultiplierWeiPerEthUpdates:test_applyPremiumMultiplierWeiPerEthUpdatesMultipleTokens_Success() (gas: 53981) -EVM2EVMMultiOnRamp_applyPremiumMultiplierWeiPerEthUpdates:test_applyPremiumMultiplierWeiPerEthUpdatesSingleToken_Success() (gas: 44763) -EVM2EVMMultiOnRamp_applyPremiumMultiplierWeiPerEthUpdates:test_applyPremiumMultiplierWeiPerEthUpdatesZeroInput() (gas: 12280) -EVM2EVMMultiOnRamp_applyTokenTransferFeeConfigUpdates:test_ApplyTokenTransferFeeConfig_Success() (gas: 86785) -EVM2EVMMultiOnRamp_applyTokenTransferFeeConfigUpdates:test_ApplyTokenTransferFeeZeroInput() (gas: 13089) -EVM2EVMMultiOnRamp_applyTokenTransferFeeConfigUpdates:test_InvalidDestBytesOverhead_Revert() (gas: 17084) -EVM2EVMMultiOnRamp_applyTokenTransferFeeConfigUpdates:test_OnlyCallableByOwnerOrAdmin_Revert() (gas: 12268) -EVM2EVMMultiOnRamp_constructor:test_Constructor_InvalidConfigLinkChainSelectorEqZero_Revert() (gas: 143130) -EVM2EVMMultiOnRamp_constructor:test_Constructor_InvalidConfigLinkTokenEqAddressZero_Revert() (gas: 138745) -EVM2EVMMultiOnRamp_constructor:test_Constructor_InvalidConfigNonceManagerEqAddressZero_Revert() (gas: 141031) -EVM2EVMMultiOnRamp_constructor:test_Constructor_InvalidConfigRMNProxyEqAddressZero_Revert() (gas: 146052) -EVM2EVMMultiOnRamp_constructor:test_Constructor_InvalidConfigTokenAdminRegistryEqAddressZero_Revert() (gas: 141098) -EVM2EVMMultiOnRamp_constructor:test_Constructor_Success() (gas: 5372179) -EVM2EVMMultiOnRamp_convertParsedExtraArgs:test_EVMExtraArgsDefault_Success() (gas: 18235) -EVM2EVMMultiOnRamp_convertParsedExtraArgs:test_EVMExtraArgsEnforceOutOfOrder_Revert() (gas: 22580) -EVM2EVMMultiOnRamp_convertParsedExtraArgs:test_EVMExtraArgsGasLimitTooHigh_Revert() (gas: 19677) -EVM2EVMMultiOnRamp_convertParsedExtraArgs:test_EVMExtraArgsInvalidExtraArgsTag_Revert() (gas: 19202) -EVM2EVMMultiOnRamp_convertParsedExtraArgs:test_EVMExtraArgsV1_Success() (gas: 19292) -EVM2EVMMultiOnRamp_convertParsedExtraArgs:test_EVMExtraArgsV2_Success() (gas: 19431) -EVM2EVMMultiOnRamp_convertParsedExtraArgs:test_EmptyExtraArgs_Success() (gas: 19657) -EVM2EVMMultiOnRamp_forwardFromRouter:test_CannotSendZeroTokens_Revert() (gas: 105069) -EVM2EVMMultiOnRamp_forwardFromRouter:test_EnforceOutOfOrder_Revert() (gas: 109195) -EVM2EVMMultiOnRamp_forwardFromRouter:test_ForwardFromRouterExtraArgsV2AllowOutOfOrderTrue_Success() (gas: 138322) -EVM2EVMMultiOnRamp_forwardFromRouter:test_ForwardFromRouterExtraArgsV2_Success() (gas: 169134) -EVM2EVMMultiOnRamp_forwardFromRouter:test_ForwardFromRouterSuccessCustomExtraArgs() (gas: 168557) -EVM2EVMMultiOnRamp_forwardFromRouter:test_ForwardFromRouterSuccessEmptyExtraArgs() (gas: 167963) -EVM2EVMMultiOnRamp_forwardFromRouter:test_ForwardFromRouterSuccessLegacyExtraArgs() (gas: 168831) -EVM2EVMMultiOnRamp_forwardFromRouter:test_ForwardFromRouter_Success() (gas: 168192) -EVM2EVMMultiOnRamp_forwardFromRouter:test_InvalidAddressEncodePacked_Revert() (gas: 31992) -EVM2EVMMultiOnRamp_forwardFromRouter:test_InvalidChainSelector_Revert() (gas: 27934) -EVM2EVMMultiOnRamp_forwardFromRouter:test_InvalidEVMAddressDestToken_Revert() (gas: 3525905) -EVM2EVMMultiOnRamp_forwardFromRouter:test_InvalidEVMAddress_Revert() (gas: 32232) -EVM2EVMMultiOnRamp_forwardFromRouter:test_InvalidExtraArgsTag_Revert() (gas: 37388) -EVM2EVMMultiOnRamp_forwardFromRouter:test_MessageGasLimitTooHigh_Revert() (gas: 38351) -EVM2EVMMultiOnRamp_forwardFromRouter:test_MessageTooLarge_Revert() (gas: 107541) -EVM2EVMMultiOnRamp_forwardFromRouter:test_MessageValidationError_Revert() (gas: 152074) -EVM2EVMMultiOnRamp_forwardFromRouter:test_MesssageFeeTooHigh_Revert() (gas: 33678) -EVM2EVMMultiOnRamp_forwardFromRouter:test_OriginalSender_Revert() (gas: 23015) -EVM2EVMMultiOnRamp_forwardFromRouter:test_Paused_Revert() (gas: 41465) -EVM2EVMMultiOnRamp_forwardFromRouter:test_Permissions_Revert() (gas: 25860) -EVM2EVMMultiOnRamp_forwardFromRouter:test_ShouldIncrementNonceOnlyOnOrdered_Success() (gas: 242526) -EVM2EVMMultiOnRamp_forwardFromRouter:test_ShouldIncrementSeqNumAndNonce_Success() (gas: 268532) -EVM2EVMMultiOnRamp_forwardFromRouter:test_ShouldStoreLinkFees() (gas: 152647) -EVM2EVMMultiOnRamp_forwardFromRouter:test_ShouldStoreNonLinkFees() (gas: 179581) -EVM2EVMMultiOnRamp_forwardFromRouter:test_SourceTokenDataTooLarge_Revert() (gas: 3820695) -EVM2EVMMultiOnRamp_forwardFromRouter:test_TooManyTokens_Revert() (gas: 29961) -EVM2EVMMultiOnRamp_forwardFromRouter:test_Unhealthy_Revert() (gas: 44169) -EVM2EVMMultiOnRamp_forwardFromRouter:test_UnsupportedToken_Revert() (gas: 144102) -EVM2EVMMultiOnRamp_forwardFromRouter:test_ZeroAddressReceiver_Revert() (gas: 250642) -EVM2EVMMultiOnRamp_forwardFromRouter:test_forwardFromRouter_UnsupportedToken_Revert() (gas: 107163) -EVM2EVMMultiOnRamp_forwardFromRouter:test_forwardFromRouter_WithValidation_Success() (gas: 283856) -EVM2EVMMultiOnRamp_getDataAvailabilityCost:test_EmptyMessageCalculatesDataAvailabilityCost_Success() (gas: 125164) -EVM2EVMMultiOnRamp_getDataAvailabilityCost:test_SimpleMessageCalculatesDataAvailabilityCostUnsupportedDestChainSelector_Success() (gas: 12013) -EVM2EVMMultiOnRamp_getDataAvailabilityCost:test_SimpleMessageCalculatesDataAvailabilityCost_Success() (gas: 24707) -EVM2EVMMultiOnRamp_getFee:test_DestinationChainNotEnabled_Revert() (gas: 15422) -EVM2EVMMultiOnRamp_getFee:test_EmptyMessage_Success() (gas: 101749) -EVM2EVMMultiOnRamp_getFee:test_HighGasMessage_Success() (gas: 258343) -EVM2EVMMultiOnRamp_getFee:test_MessageGasLimitTooHigh_Revert() (gas: 42468) -EVM2EVMMultiOnRamp_getFee:test_MessageTooLarge_Revert() (gas: 95014) -EVM2EVMMultiOnRamp_getFee:test_MessageWithDataAndTokenTransfer_Success() (gas: 182871) -EVM2EVMMultiOnRamp_getFee:test_NotAFeeToken_Revert() (gas: 21863) -EVM2EVMMultiOnRamp_getFee:test_SingleTokenMessage_Success() (gas: 141280) -EVM2EVMMultiOnRamp_getFee:test_TooManyTokens_Revert() (gas: 17439) -EVM2EVMMultiOnRamp_getFee:test_ZeroDataAvailabilityMultiplier_Success() (gas: 83471) -EVM2EVMMultiOnRamp_getSupportedTokens:test_GetSupportedTokens_Revert() (gas: 10460) -EVM2EVMMultiOnRamp_getTokenPool:test_GetTokenPool_Success() (gas: 35195) -EVM2EVMMultiOnRamp_getTokenTransferCost:test_CustomTokenBpsFee_Success() (gas: 47313) -EVM2EVMMultiOnRamp_getTokenTransferCost:test_FeeTokenBpsFee_Success() (gas: 35291) -EVM2EVMMultiOnRamp_getTokenTransferCost:test_LargeTokenTransferChargesMaxFeeAndGas_Success() (gas: 28365) -EVM2EVMMultiOnRamp_getTokenTransferCost:test_MixedTokenTransferFee_Success() (gas: 130125) -EVM2EVMMultiOnRamp_getTokenTransferCost:test_NoTokenTransferChargesZeroFee_Success() (gas: 15233) -EVM2EVMMultiOnRamp_getTokenTransferCost:test_SmallTokenTransferChargesMinFeeAndGas_Success() (gas: 28173) -EVM2EVMMultiOnRamp_getTokenTransferCost:test_UnsupportedToken_Revert() (gas: 21243) -EVM2EVMMultiOnRamp_getTokenTransferCost:test_WETHTokenBpsFee_Success() (gas: 41226) -EVM2EVMMultiOnRamp_getTokenTransferCost:test_ZeroAmountTokenTransferChargesMinFeeAndGas_Success() (gas: 28196) -EVM2EVMMultiOnRamp_getTokenTransferCost:test_ZeroFeeConfigChargesMinFee_Success() (gas: 40557) -EVM2EVMMultiOnRamp_getTokenTransferCost:test_getTokenTransferCost_selfServeUsesDefaults_Success() (gas: 31676) +EVM2EVMMultiOffRamp_verify:test_TooManyLeaves_Revert() (gas: 51508) +EVM2EVMMultiOnRamp_constructor:test_Constructor_InvalidConfigChainSelectorEqZero_Revert() (gas: 94535) +EVM2EVMMultiOnRamp_constructor:test_Constructor_InvalidConfigNonceManagerEqAddressZero_Revert() (gas: 92487) +EVM2EVMMultiOnRamp_constructor:test_Constructor_InvalidConfigRMNProxyEqAddressZero_Revert() (gas: 97490) +EVM2EVMMultiOnRamp_constructor:test_Constructor_InvalidConfigTokenAdminRegistryEqAddressZero_Revert() (gas: 92545) +EVM2EVMMultiOnRamp_constructor:test_Constructor_Success() (gas: 2263558) +EVM2EVMMultiOnRamp_forwardFromRouter:test_CannotSendZeroTokens_Revert() (gas: 47624) +EVM2EVMMultiOnRamp_forwardFromRouter:test_ForwardFromRouterExtraArgsV2AllowOutOfOrderTrue_Success() (gas: 129834) +EVM2EVMMultiOnRamp_forwardFromRouter:test_ForwardFromRouterExtraArgsV2_Success() (gas: 160629) +EVM2EVMMultiOnRamp_forwardFromRouter:test_ForwardFromRouterSuccessCustomExtraArgs() (gas: 160089) +EVM2EVMMultiOnRamp_forwardFromRouter:test_ForwardFromRouterSuccessEmptyExtraArgs() (gas: 158189) +EVM2EVMMultiOnRamp_forwardFromRouter:test_ForwardFromRouterSuccessLegacyExtraArgs() (gas: 160435) +EVM2EVMMultiOnRamp_forwardFromRouter:test_ForwardFromRouter_Success() (gas: 159741) +EVM2EVMMultiOnRamp_forwardFromRouter:test_InvalidEVMAddressDestToken_Revert() (gas: 3489320) +EVM2EVMMultiOnRamp_forwardFromRouter:test_InvalidExtraArgsTag_Revert() (gas: 52560) +EVM2EVMMultiOnRamp_forwardFromRouter:test_MessageValidationError_Revert() (gas: 135805) +EVM2EVMMultiOnRamp_forwardFromRouter:test_MesssageFeeTooHigh_Revert() (gas: 50595) +EVM2EVMMultiOnRamp_forwardFromRouter:test_OriginalSender_Revert() (gas: 13029) +EVM2EVMMultiOnRamp_forwardFromRouter:test_Paused_Revert() (gas: 30927) +EVM2EVMMultiOnRamp_forwardFromRouter:test_Permissions_Revert() (gas: 15907) +EVM2EVMMultiOnRamp_forwardFromRouter:test_ShouldIncrementNonceOnlyOnOrdered_Success() (gas: 194984) +EVM2EVMMultiOnRamp_forwardFromRouter:test_ShouldIncrementSeqNumAndNonce_Success() (gas: 221161) +EVM2EVMMultiOnRamp_forwardFromRouter:test_ShouldStoreLinkFees() (gas: 140159) +EVM2EVMMultiOnRamp_forwardFromRouter:test_ShouldStoreNonLinkFees() (gas: 161705) +EVM2EVMMultiOnRamp_forwardFromRouter:test_SourceTokenDataTooLarge_Revert() (gas: 3789975) +EVM2EVMMultiOnRamp_forwardFromRouter:test_UnsupportedToken_Revert() (gas: 86620) +EVM2EVMMultiOnRamp_forwardFromRouter:test_forwardFromRouter_UnsupportedToken_Revert() (gas: 49680) +EVM2EVMMultiOnRamp_forwardFromRouter:test_forwardFromRouter_WithValidation_Success() (gas: 281916) +EVM2EVMMultiOnRamp_getFee:test_EmptyMessage_Success() (gas: 125506) +EVM2EVMMultiOnRamp_getFee:test_SingleTokenMessage_Success() (gas: 144153) +EVM2EVMMultiOnRamp_getFee:test_Unhealthy_Revert() (gas: 43571) +EVM2EVMMultiOnRamp_getSupportedTokens:test_GetSupportedTokens_Revert() (gas: 10438) +EVM2EVMMultiOnRamp_getTokenPool:test_GetTokenPool_Success() (gas: 35204) EVM2EVMMultiOnRamp_setDynamicConfig:test_SetConfigInvalidConfigFeeAggregatorEqAddressZero_Revert() (gas: 11356) EVM2EVMMultiOnRamp_setDynamicConfig:test_SetConfigInvalidConfigPriceRegistryEqAddressZero_Revert() (gas: 12956) EVM2EVMMultiOnRamp_setDynamicConfig:test_SetConfigInvalidConfig_Revert() (gas: 11313) EVM2EVMMultiOnRamp_setDynamicConfig:test_SetConfigOnlyOwner_Revert() (gas: 16287) -EVM2EVMMultiOnRamp_setDynamicConfig:test_SetDynamicConfig_Success() (gas: 60060) -EVM2EVMMultiOnRamp_validateDestFamilyAddress:test_InvalidEVMAddress_Revert() (gas: 10895) -EVM2EVMMultiOnRamp_validateDestFamilyAddress:test_ValidEVMAddress_Success() (gas: 6755) -EVM2EVMMultiOnRamp_validateDestFamilyAddress:test_ValidNonEVMAddress_Success() (gas: 6461) -EVM2EVMMultiOnRamp_withdrawFeeTokens:test_WithdrawFeeTokens_Success() (gas: 97211) +EVM2EVMMultiOnRamp_setDynamicConfig:test_SetDynamicConfig_Success() (gas: 58439) +EVM2EVMMultiOnRamp_withdrawFeeTokens:test_WithdrawFeeTokens_Success() (gas: 97185) EVM2EVMOffRamp__releaseOrMintToken:test__releaseOrMintToken_NotACompatiblePool_Revert() (gas: 38076) EVM2EVMOffRamp__releaseOrMintToken:test__releaseOrMintToken_Success() (gas: 108251) EVM2EVMOffRamp__releaseOrMintToken:test__releaseOrMintToken_TokenHandlingError_revert_Revert() (gas: 116792) -EVM2EVMOffRamp__releaseOrMintTokens:test_OverValueWithARLOff_Success() (gas: 391761) -EVM2EVMOffRamp__releaseOrMintTokens:test_PriceNotFoundForToken_Reverts() (gas: 145226) -EVM2EVMOffRamp__releaseOrMintTokens:test_RateLimitErrors_Reverts() (gas: 788205) -EVM2EVMOffRamp__releaseOrMintTokens:test_TokenHandlingError_Reverts() (gas: 176249) +EVM2EVMOffRamp__releaseOrMintTokens:test_OverValueWithARLOff_Success() (gas: 391989) +EVM2EVMOffRamp__releaseOrMintTokens:test_PriceNotFoundForToken_Reverts() (gas: 145308) +EVM2EVMOffRamp__releaseOrMintTokens:test_RateLimitErrors_Reverts() (gas: 788570) +EVM2EVMOffRamp__releaseOrMintTokens:test_TokenHandlingError_Reverts() (gas: 176322) EVM2EVMOffRamp__releaseOrMintTokens:test__releaseOrMintTokens_NotACompatiblePool_Reverts() (gas: 29724) EVM2EVMOffRamp__releaseOrMintTokens:test_releaseOrMintTokens_InvalidDataLengthReturnData_Revert() (gas: 63379) EVM2EVMOffRamp__releaseOrMintTokens:test_releaseOrMintTokens_InvalidEVMAddress_Revert() (gas: 44501) -EVM2EVMOffRamp__releaseOrMintTokens:test_releaseOrMintTokens_Success() (gas: 214125) -EVM2EVMOffRamp__releaseOrMintTokens:test_releaseOrMintTokens_destDenominatedDecimals_Success() (gas: 306891) -EVM2EVMOffRamp__report:test_Report_Success() (gas: 127704) -EVM2EVMOffRamp__trialExecute:test_RateLimitError_Success() (gas: 255073) -EVM2EVMOffRamp__trialExecute:test_TokenHandlingErrorIsCaught_Success() (gas: 263664) -EVM2EVMOffRamp__trialExecute:test_TokenPoolIsNotAContract_Success() (gas: 335854) -EVM2EVMOffRamp__trialExecute:test_trialExecute_Success() (gas: 314502) -EVM2EVMOffRamp_ccipReceive:test_Reverts() (gas: 17096) +EVM2EVMOffRamp__releaseOrMintTokens:test_releaseOrMintTokens_Success() (gas: 214271) +EVM2EVMOffRamp__releaseOrMintTokens:test_releaseOrMintTokens_destDenominatedDecimals_Success() (gas: 307008) +EVM2EVMOffRamp__report:test_Report_Success() (gas: 127671) +EVM2EVMOffRamp__trialExecute:test_RateLimitError_Success() (gas: 255161) +EVM2EVMOffRamp__trialExecute:test_TokenHandlingErrorIsCaught_Success() (gas: 263752) +EVM2EVMOffRamp__trialExecute:test_TokenPoolIsNotAContract_Success() (gas: 336015) +EVM2EVMOffRamp__trialExecute:test_trialExecute_Success() (gas: 314648) +EVM2EVMOffRamp_ccipReceive:test_Reverts() (gas: 17009) EVM2EVMOffRamp_constructor:test_CommitStoreAlreadyInUse_Revert() (gas: 153464) EVM2EVMOffRamp_constructor:test_Constructor_Success() (gas: 5491136) EVM2EVMOffRamp_constructor:test_ZeroOnRampAddress_Revert() (gas: 144220) EVM2EVMOffRamp_execute:test_EmptyReport_Revert() (gas: 21345) EVM2EVMOffRamp_execute:test_InvalidMessageId_Revert() (gas: 36442) EVM2EVMOffRamp_execute:test_InvalidSourceChain_Revert() (gas: 51710) -EVM2EVMOffRamp_execute:test_InvalidSourcePoolAddress_Success() (gas: 473868) +EVM2EVMOffRamp_execute:test_InvalidSourcePoolAddress_Success() (gas: 474014) EVM2EVMOffRamp_execute:test_ManualExecutionNotYetEnabled_Revert() (gas: 46423) EVM2EVMOffRamp_execute:test_MessageTooLarge_Revert() (gas: 152462) EVM2EVMOffRamp_execute:test_Paused_Revert() (gas: 101458) @@ -379,25 +324,25 @@ EVM2EVMOffRamp_execute:test_SingleMessageNoTokensUnordered_Success() (gas: 15986 EVM2EVMOffRamp_execute:test_SingleMessageNoTokens_Success() (gas: 175094) EVM2EVMOffRamp_execute:test_SingleMessageToNonCCIPReceiver_Success() (gas: 248764) EVM2EVMOffRamp_execute:test_SingleMessagesNoTokensSuccess_gas() (gas: 115229) -EVM2EVMOffRamp_execute:test_SkippedIncorrectNonceStillExecutes_Success() (gas: 409544) +EVM2EVMOffRamp_execute:test_SkippedIncorrectNonceStillExecutes_Success() (gas: 409690) EVM2EVMOffRamp_execute:test_SkippedIncorrectNonce_Success() (gas: 54182) EVM2EVMOffRamp_execute:test_StrictUntouchedToSuccess_Success() (gas: 132300) EVM2EVMOffRamp_execute:test_TokenDataMismatch_Revert() (gas: 52209) -EVM2EVMOffRamp_execute:test_TwoMessagesWithTokensAndGE_Success() (gas: 560574) -EVM2EVMOffRamp_execute:test_TwoMessagesWithTokensSuccess_gas() (gas: 499810) +EVM2EVMOffRamp_execute:test_TwoMessagesWithTokensAndGE_Success() (gas: 560866) +EVM2EVMOffRamp_execute:test_TwoMessagesWithTokensSuccess_gas() (gas: 500102) EVM2EVMOffRamp_execute:test_UnexpectedTokenData_Revert() (gas: 35442) -EVM2EVMOffRamp_execute:test_Unhealthy_Revert() (gas: 547373) +EVM2EVMOffRamp_execute:test_Unhealthy_Revert() (gas: 547665) EVM2EVMOffRamp_execute:test_UnsupportedNumberOfTokens_Revert() (gas: 64054) EVM2EVMOffRamp_execute:test__execute_SkippedAlreadyExecutedMessageUnordered_Success() (gas: 123437) EVM2EVMOffRamp_execute:test__execute_SkippedAlreadyExecutedMessage_Success() (gas: 143600) -EVM2EVMOffRamp_executeSingleMessage:test_MessageSender_Revert() (gas: 20615) -EVM2EVMOffRamp_executeSingleMessage:test_NonContractWithTokens_Success() (gas: 281878) -EVM2EVMOffRamp_executeSingleMessage:test_NonContract_Success() (gas: 20264) -EVM2EVMOffRamp_executeSingleMessage:test_TokenHandlingError_Revert() (gas: 219282) -EVM2EVMOffRamp_executeSingleMessage:test_ZeroGasDONExecution_Revert() (gas: 48747) -EVM2EVMOffRamp_executeSingleMessage:test_executeSingleMessage_NoTokens_Success() (gas: 48235) -EVM2EVMOffRamp_executeSingleMessage:test_executeSingleMessage_WithTokens_Success() (gas: 316572) -EVM2EVMOffRamp_executeSingleMessage:test_executeSingleMessage_ZeroGasZeroData_Success() (gas: 72637) +EVM2EVMOffRamp_executeSingleMessage:test_MessageSender_Revert() (gas: 20582) +EVM2EVMOffRamp_executeSingleMessage:test_NonContractWithTokens_Success() (gas: 282011) +EVM2EVMOffRamp_executeSingleMessage:test_NonContract_Success() (gas: 20231) +EVM2EVMOffRamp_executeSingleMessage:test_TokenHandlingError_Revert() (gas: 219342) +EVM2EVMOffRamp_executeSingleMessage:test_ZeroGasDONExecution_Revert() (gas: 48714) +EVM2EVMOffRamp_executeSingleMessage:test_executeSingleMessage_NoTokens_Success() (gas: 48202) +EVM2EVMOffRamp_executeSingleMessage:test_executeSingleMessage_WithTokens_Success() (gas: 316682) +EVM2EVMOffRamp_executeSingleMessage:test_executeSingleMessage_ZeroGasZeroData_Success() (gas: 72505) EVM2EVMOffRamp_execute_upgrade:test_V2NonceNewSenderStartsAtZero_Success() (gas: 231806) EVM2EVMOffRamp_execute_upgrade:test_V2NonceStartsAtV1Nonce_Success() (gas: 280627) EVM2EVMOffRamp_execute_upgrade:test_V2OffRampNonceSkipsIfMsgInFlight_Success() (gas: 261674) @@ -406,15 +351,15 @@ EVM2EVMOffRamp_execute_upgrade:test_V2_Success() (gas: 131906) EVM2EVMOffRamp_getAllRateLimitTokens:test_GetAllRateLimitTokens_Success() (gas: 38408) EVM2EVMOffRamp_getExecutionState:test_FillExecutionState_Success() (gas: 3213556) EVM2EVMOffRamp_getExecutionState:test_GetExecutionState_Success() (gas: 83091) -EVM2EVMOffRamp_manuallyExecute:test_LowGasLimitManualExec_Success() (gas: 483813) -EVM2EVMOffRamp_manuallyExecute:test_ManualExecFailedTx_Revert() (gas: 186809) -EVM2EVMOffRamp_manuallyExecute:test_ManualExecForkedChain_Revert() (gas: 25894) -EVM2EVMOffRamp_manuallyExecute:test_ManualExecGasLimitMismatch_Revert() (gas: 43519) -EVM2EVMOffRamp_manuallyExecute:test_ManualExecInvalidGasLimit_Revert() (gas: 26009) -EVM2EVMOffRamp_manuallyExecute:test_ManualExecWithGasOverride_Success() (gas: 189003) -EVM2EVMOffRamp_manuallyExecute:test_ManualExec_Success() (gas: 188464) -EVM2EVMOffRamp_manuallyExecute:test_ReentrancyManualExecuteFails() (gas: 2027697) -EVM2EVMOffRamp_manuallyExecute:test_manuallyExecute_DoesNotRevertIfUntouched_Success() (gas: 144106) +EVM2EVMOffRamp_manuallyExecute:test_LowGasLimitManualExec_Success() (gas: 483673) +EVM2EVMOffRamp_manuallyExecute:test_ManualExecFailedTx_Revert() (gas: 186669) +EVM2EVMOffRamp_manuallyExecute:test_ManualExecForkedChain_Revert() (gas: 25824) +EVM2EVMOffRamp_manuallyExecute:test_ManualExecGasLimitMismatch_Revert() (gas: 43449) +EVM2EVMOffRamp_manuallyExecute:test_ManualExecInvalidGasLimit_Revert() (gas: 25939) +EVM2EVMOffRamp_manuallyExecute:test_ManualExecWithGasOverride_Success() (gas: 188863) +EVM2EVMOffRamp_manuallyExecute:test_ManualExec_Success() (gas: 188324) +EVM2EVMOffRamp_manuallyExecute:test_ReentrancyManualExecuteFails() (gas: 2027645) +EVM2EVMOffRamp_manuallyExecute:test_manuallyExecute_DoesNotRevertIfUntouched_Success() (gas: 143966) EVM2EVMOffRamp_metadataHash:test_MetadataHash_Success() (gas: 8871) EVM2EVMOffRamp_setDynamicConfig:test_NonOwner_Revert() (gas: 40429) EVM2EVMOffRamp_setDynamicConfig:test_RouterZeroAddress_Revert() (gas: 38804) @@ -434,22 +379,22 @@ EVM2EVMOnRamp_forwardFromRouter:test_InvalidAddressEncodePacked_Revert() (gas: 4 EVM2EVMOnRamp_forwardFromRouter:test_InvalidAddress_Revert() (gas: 40686) EVM2EVMOnRamp_forwardFromRouter:test_InvalidChainSelector_Revert() (gas: 25517) EVM2EVMOnRamp_forwardFromRouter:test_InvalidExtraArgsTag_Revert() (gas: 25303) -EVM2EVMOnRamp_forwardFromRouter:test_MaxCapacityExceeded_Revert() (gas: 85978) +EVM2EVMOnRamp_forwardFromRouter:test_MaxCapacityExceeded_Revert() (gas: 86051) EVM2EVMOnRamp_forwardFromRouter:test_MaxFeeBalanceReached_Revert() (gas: 36467) EVM2EVMOnRamp_forwardFromRouter:test_MessageGasLimitTooHigh_Revert() (gas: 29049) EVM2EVMOnRamp_forwardFromRouter:test_MessageTooLarge_Revert() (gas: 107532) EVM2EVMOnRamp_forwardFromRouter:test_OriginalSender_Revert() (gas: 22641) -EVM2EVMOnRamp_forwardFromRouter:test_OverValueWithARLOff_Success() (gas: 223807) +EVM2EVMOnRamp_forwardFromRouter:test_OverValueWithARLOff_Success() (gas: 223889) EVM2EVMOnRamp_forwardFromRouter:test_Paused_Revert() (gas: 53941) EVM2EVMOnRamp_forwardFromRouter:test_Permissions_Revert() (gas: 25487) -EVM2EVMOnRamp_forwardFromRouter:test_PriceNotFoundForToken_Revert() (gas: 59100) +EVM2EVMOnRamp_forwardFromRouter:test_PriceNotFoundForToken_Revert() (gas: 59182) EVM2EVMOnRamp_forwardFromRouter:test_ShouldIncrementNonceOnlyOnOrdered_Success() (gas: 182506) EVM2EVMOnRamp_forwardFromRouter:test_ShouldIncrementSeqNumAndNonce_Success() (gas: 178109) -EVM2EVMOnRamp_forwardFromRouter:test_ShouldStoreNonLinkFees() (gas: 137373) +EVM2EVMOnRamp_forwardFromRouter:test_ShouldStoreNonLinkFees() (gas: 137558) EVM2EVMOnRamp_forwardFromRouter:test_SourceTokenDataTooLarge_Revert() (gas: 3734188) EVM2EVMOnRamp_forwardFromRouter:test_TooManyTokens_Revert() (gas: 30193) EVM2EVMOnRamp_forwardFromRouter:test_Unhealthy_Revert() (gas: 43306) -EVM2EVMOnRamp_forwardFromRouter:test_UnsupportedToken_Revert() (gas: 109379) +EVM2EVMOnRamp_forwardFromRouter:test_UnsupportedToken_Revert() (gas: 109388) EVM2EVMOnRamp_forwardFromRouter:test_ZeroAddressReceiver_Revert() (gas: 335457) EVM2EVMOnRamp_forwardFromRouter:test_forwardFromRouter_ShouldStoreLinkFees_Success() (gas: 112580) EVM2EVMOnRamp_forwardFromRouter:test_forwardFromRouter_UnsupportedToken_Revert() (gas: 72442) @@ -459,21 +404,21 @@ EVM2EVMOnRamp_forwardFromRouter_upgrade:test_V2SenderNoncesReadsPreviousRamp_Suc EVM2EVMOnRamp_forwardFromRouter_upgrade:test_V2_Success() (gas: 95395) EVM2EVMOnRamp_getDataAvailabilityCost:test_EmptyMessageCalculatesDataAvailabilityCost_Success() (gas: 20760) EVM2EVMOnRamp_getDataAvailabilityCost:test_SimpleMessageCalculatesDataAvailabilityCost_Success() (gas: 21128) -EVM2EVMOnRamp_getFee:test_EmptyMessage_Success() (gas: 78194) -EVM2EVMOnRamp_getFee:test_HighGasMessage_Success() (gas: 234042) +EVM2EVMOnRamp_getFee:test_EmptyMessage_Success() (gas: 78250) +EVM2EVMOnRamp_getFee:test_HighGasMessage_Success() (gas: 234098) EVM2EVMOnRamp_getFee:test_MessageGasLimitTooHigh_Revert() (gas: 16715) EVM2EVMOnRamp_getFee:test_MessageTooLarge_Revert() (gas: 95271) -EVM2EVMOnRamp_getFee:test_MessageWithDataAndTokenTransfer_Success() (gas: 158998) +EVM2EVMOnRamp_getFee:test_MessageWithDataAndTokenTransfer_Success() (gas: 159360) EVM2EVMOnRamp_getFee:test_NotAFeeToken_Revert() (gas: 24093) -EVM2EVMOnRamp_getFee:test_SingleTokenMessage_Success() (gas: 117764) +EVM2EVMOnRamp_getFee:test_SingleTokenMessage_Success() (gas: 117922) EVM2EVMOnRamp_getFee:test_TooManyTokens_Revert() (gas: 19902) -EVM2EVMOnRamp_getFee:test_ZeroDataAvailabilityMultiplier_Success() (gas: 65639) +EVM2EVMOnRamp_getFee:test_ZeroDataAvailabilityMultiplier_Success() (gas: 65667) EVM2EVMOnRamp_getSupportedTokens:test_GetSupportedTokens_Revert() (gas: 10460) EVM2EVMOnRamp_getTokenPool:test_GetTokenPool_Success() (gas: 35195) -EVM2EVMOnRamp_getTokenTransferCost:test_CustomTokenBpsFee_Success() (gas: 45008) +EVM2EVMOnRamp_getTokenTransferCost:test_CustomTokenBpsFee_Success() (gas: 45059) EVM2EVMOnRamp_getTokenTransferCost:test_FeeTokenBpsFee_Success() (gas: 33041) EVM2EVMOnRamp_getTokenTransferCost:test_LargeTokenTransferChargesMaxFeeAndGas_Success() (gas: 28296) -EVM2EVMOnRamp_getTokenTransferCost:test_MixedTokenTransferFee_Success() (gas: 130015) +EVM2EVMOnRamp_getTokenTransferCost:test_MixedTokenTransferFee_Success() (gas: 130321) EVM2EVMOnRamp_getTokenTransferCost:test_NoTokenTransferChargesZeroFee_Success() (gas: 15260) EVM2EVMOnRamp_getTokenTransferCost:test_SmallTokenTransferChargesMinFeeAndGas_Success() (gas: 28104) EVM2EVMOnRamp_getTokenTransferCost:test_UnsupportedToken_Revert() (gas: 21248) @@ -591,28 +536,28 @@ MultiAggregateRateLimiter_constructor:test_ConstructorNoAuthorizedCallers_Succes MultiAggregateRateLimiter_constructor:test_Constructor_Success() (gas: 2085252) MultiAggregateRateLimiter_getTokenBucket:test_GetTokenBucket_Success() (gas: 30248) MultiAggregateRateLimiter_getTokenBucket:test_Refill_Success() (gas: 47358) -MultiAggregateRateLimiter_getTokenBucket:test_TimeUnderflow_Revert() (gas: 15806) -MultiAggregateRateLimiter_getTokenValue:test_GetTokenValue_Success() (gas: 19595) -MultiAggregateRateLimiter_getTokenValue:test_NoTokenPrice_Reverts() (gas: 21180) +MultiAggregateRateLimiter_getTokenBucket:test_TimeUnderflow_Revert() (gas: 15821) +MultiAggregateRateLimiter_getTokenValue:test_GetTokenValue_Success() (gas: 19668) +MultiAggregateRateLimiter_getTokenValue:test_NoTokenPrice_Reverts() (gas: 21253) MultiAggregateRateLimiter_onInboundMessage:test_ValidateMessageFromUnauthorizedCaller_Revert() (gas: 14527) -MultiAggregateRateLimiter_onInboundMessage:test_ValidateMessageWithDifferentTokensOnDifferentChains_Success() (gas: 189231) -MultiAggregateRateLimiter_onInboundMessage:test_ValidateMessageWithDisabledRateLimitToken_Success() (gas: 59854) +MultiAggregateRateLimiter_onInboundMessage:test_ValidateMessageWithDifferentTokensOnDifferentChains_Success() (gas: 189450) +MultiAggregateRateLimiter_onInboundMessage:test_ValidateMessageWithDisabledRateLimitToken_Success() (gas: 59927) MultiAggregateRateLimiter_onInboundMessage:test_ValidateMessageWithNoTokens_Success() (gas: 17593) MultiAggregateRateLimiter_onInboundMessage:test_ValidateMessageWithRateLimitDisabled_Success() (gas: 44895) -MultiAggregateRateLimiter_onInboundMessage:test_ValidateMessageWithRateLimitExceeded_Revert() (gas: 50452) -MultiAggregateRateLimiter_onInboundMessage:test_ValidateMessageWithRateLimitReset_Success() (gas: 78488) -MultiAggregateRateLimiter_onInboundMessage:test_ValidateMessageWithTokensOnDifferentChains_Success() (gas: 263218) -MultiAggregateRateLimiter_onInboundMessage:test_ValidateMessageWithTokens_Success() (gas: 54638) +MultiAggregateRateLimiter_onInboundMessage:test_ValidateMessageWithRateLimitExceeded_Revert() (gas: 50598) +MultiAggregateRateLimiter_onInboundMessage:test_ValidateMessageWithRateLimitReset_Success() (gas: 78780) +MultiAggregateRateLimiter_onInboundMessage:test_ValidateMessageWithTokensOnDifferentChains_Success() (gas: 263510) +MultiAggregateRateLimiter_onInboundMessage:test_ValidateMessageWithTokens_Success() (gas: 54784) MultiAggregateRateLimiter_onOutboundMessage:test_RateLimitValueDifferentLanes_Success() (gas: 9223372036854754743) MultiAggregateRateLimiter_onOutboundMessage:test_ValidateMessageWithNoTokens_Success() (gas: 19104) MultiAggregateRateLimiter_onOutboundMessage:test_onOutboundMessage_ValidateMessageFromUnauthorizedCaller_Revert() (gas: 15778) -MultiAggregateRateLimiter_onOutboundMessage:test_onOutboundMessage_ValidateMessageWithDifferentTokensOnDifferentChains_Success() (gas: 189219) -MultiAggregateRateLimiter_onOutboundMessage:test_onOutboundMessage_ValidateMessageWithDisabledRateLimitToken_Success() (gas: 61589) +MultiAggregateRateLimiter_onOutboundMessage:test_onOutboundMessage_ValidateMessageWithDifferentTokensOnDifferentChains_Success() (gas: 189438) +MultiAggregateRateLimiter_onOutboundMessage:test_onOutboundMessage_ValidateMessageWithDisabledRateLimitToken_Success() (gas: 61662) MultiAggregateRateLimiter_onOutboundMessage:test_onOutboundMessage_ValidateMessageWithRateLimitDisabled_Success() (gas: 46683) -MultiAggregateRateLimiter_onOutboundMessage:test_onOutboundMessage_ValidateMessageWithRateLimitExceeded_Revert() (gas: 52225) -MultiAggregateRateLimiter_onOutboundMessage:test_onOutboundMessage_ValidateMessageWithRateLimitReset_Success() (gas: 79553) -MultiAggregateRateLimiter_onOutboundMessage:test_onOutboundMessage_ValidateMessageWithTokensOnDifferentChains_Success() (gas: 263432) -MultiAggregateRateLimiter_onOutboundMessage:test_onOutboundMessage_ValidateMessageWithTokens_Success() (gas: 56395) +MultiAggregateRateLimiter_onOutboundMessage:test_onOutboundMessage_ValidateMessageWithRateLimitExceeded_Revert() (gas: 52371) +MultiAggregateRateLimiter_onOutboundMessage:test_onOutboundMessage_ValidateMessageWithRateLimitReset_Success() (gas: 79845) +MultiAggregateRateLimiter_onOutboundMessage:test_onOutboundMessage_ValidateMessageWithTokensOnDifferentChains_Success() (gas: 263724) +MultiAggregateRateLimiter_onOutboundMessage:test_onOutboundMessage_ValidateMessageWithTokens_Success() (gas: 56541) MultiAggregateRateLimiter_setPriceRegistry:test_OnlyOwner_Revert() (gas: 11336) MultiAggregateRateLimiter_setPriceRegistry:test_Owner_Success() (gas: 19124) MultiAggregateRateLimiter_setPriceRegistry:test_ZeroAddress_Revert() (gas: 10608) @@ -653,22 +598,22 @@ MultiOCR3Base_transmit:test_UnAuthorizedTransmitter_Revert() (gas: 24191) MultiOCR3Base_transmit:test_UnauthorizedSigner_Revert() (gas: 61409) MultiOCR3Base_transmit:test_UnconfiguredPlugin_Revert() (gas: 39890) MultiOCR3Base_transmit:test_ZeroSignatures_Revert() (gas: 32973) -MultiRampsE2E:test_E2E_3MessagesSuccess_gas() (gas: 1457013) +MultiRampsE2E:test_E2E_3MessagesSuccess_gas() (gas: 1447576) NonceManager_NonceIncrementation:test_getIncrementedOutboundNonce_Success() (gas: 37907) NonceManager_NonceIncrementation:test_incrementInboundNonce_Skip() (gas: 23694) NonceManager_NonceIncrementation:test_incrementInboundNonce_Success() (gas: 38763) NonceManager_NonceIncrementation:test_incrementNoncesInboundAndOutbound_Success() (gas: 71847) NonceManager_OffRampUpgrade:test_NoPrevOffRampForChain_Success() (gas: 252899) -NonceManager_OffRampUpgrade:test_UpgradedNonceNewSenderStartsAtZero_Success() (gas: 255229) +NonceManager_OffRampUpgrade:test_UpgradedNonceNewSenderStartsAtZero_Success() (gas: 255223) NonceManager_OffRampUpgrade:test_UpgradedNonceStartsAtV1Nonce_Success() (gas: 308391) NonceManager_OffRampUpgrade:test_UpgradedOffRampNonceSkipsIfMsgInFlight_Success() (gas: 291386) NonceManager_OffRampUpgrade:test_UpgradedSenderNoncesReadsPreviousRampTransitive_Success() (gas: 248762) NonceManager_OffRampUpgrade:test_UpgradedSenderNoncesReadsPreviousRamp_Success() (gas: 236748) NonceManager_OffRampUpgrade:test_Upgraded_Success() (gas: 144907) -NonceManager_OnRampUpgrade:test_UpgradeNonceNewSenderStartsAtZero_Success() (gas: 185728) -NonceManager_OnRampUpgrade:test_UpgradeNonceStartsAtV1Nonce_Success() (gas: 242161) +NonceManager_OnRampUpgrade:test_UpgradeNonceNewSenderStartsAtZero_Success() (gas: 185792) +NonceManager_OnRampUpgrade:test_UpgradeNonceStartsAtV1Nonce_Success() (gas: 235789) NonceManager_OnRampUpgrade:test_UpgradeSenderNoncesReadsPreviousRamp_Success() (gas: 125653) -NonceManager_OnRampUpgrade:test_Upgrade_Success() (gas: 133226) +NonceManager_OnRampUpgrade:test_Upgrade_Success() (gas: 124790) NonceManager_applyPreviousRampsUpdates:test_MultipleRampsUpdates() (gas: 122899) NonceManager_applyPreviousRampsUpdates:test_PreviousRampAlreadySetOffRamp_Revert() (gas: 42959) NonceManager_applyPreviousRampsUpdates:test_PreviousRampAlreadySetOnRampAndOffRamp_Revert() (gas: 64282) @@ -700,47 +645,76 @@ OCR2Base_transmit:test_Transmit2SignersSuccess_gas() (gas: 51686) OCR2Base_transmit:test_UnAuthorizedTransmitter_Revert() (gas: 23484) OCR2Base_transmit:test_UnauthorizedSigner_Revert() (gas: 39665) OCR2Base_transmit:test_WrongNumberOfSignatures_Revert() (gas: 20557) -OnRampTokenPoolReentrancy:test_OnRampTokenPoolReentrancy_Success() (gas: 380711) -PingPong_ccipReceive:test_CcipReceive_Success() (gas: 148611) +OnRampTokenPoolReentrancy:test_OnRampTokenPoolReentrancy_Success() (gas: 380941) +PingPong_ccipReceive:test_CcipReceive_Success() (gas: 148639) PingPong_plumbing:test_Pausing_Success() (gas: 17803) -PingPong_startPingPong:test_StartPingPong_Success() (gas: 178547) -PriceRegistry_applyFeeTokensUpdates:test_ApplyFeeTokensUpdates_Success() (gas: 79823) -PriceRegistry_applyFeeTokensUpdates:test_OnlyCallableByOwner_Revert() (gas: 12580) -PriceRegistry_constructor:test_InvalidStalenessThreshold_Revert() (gas: 67418) -PriceRegistry_constructor:test_Setup_Success() (gas: 1870666) -PriceRegistry_convertTokenAmount:test_ConvertTokenAmount_Success() (gas: 72712) -PriceRegistry_convertTokenAmount:test_LinkTokenNotSupported_Revert() (gas: 30917) -PriceRegistry_getTokenAndGasPrices:test_GetFeeTokenAndGasPrices_Success() (gas: 70421) -PriceRegistry_getTokenAndGasPrices:test_StaleGasPrice_Revert() (gas: 16816) -PriceRegistry_getTokenAndGasPrices:test_UnsupportedChain_Revert() (gas: 16118) -PriceRegistry_getTokenAndGasPrices:test_ZeroGasPrice_Success() (gas: 45566) -PriceRegistry_getTokenPrice:test_GetTokenPriceFromFeed_Success() (gas: 62166) -PriceRegistry_getTokenPrices:test_GetTokenPrices_Success() (gas: 84739) -PriceRegistry_getValidatedTokenPrice:test_GetValidatedTokenPriceFromFeedErc20Above18Decimals_Success() (gas: 2094281) -PriceRegistry_getValidatedTokenPrice:test_GetValidatedTokenPriceFromFeedErc20Below18Decimals_Success() (gas: 2094239) -PriceRegistry_getValidatedTokenPrice:test_GetValidatedTokenPriceFromFeedFeedAt0Decimals_Success() (gas: 2074358) -PriceRegistry_getValidatedTokenPrice:test_GetValidatedTokenPriceFromFeedFeedAt18Decimals_Success() (gas: 2094013) -PriceRegistry_getValidatedTokenPrice:test_GetValidatedTokenPriceFromFeedFlippedDecimals_Success() (gas: 2094217) -PriceRegistry_getValidatedTokenPrice:test_GetValidatedTokenPriceFromFeedMaxInt224Value_Success() (gas: 2094029) -PriceRegistry_getValidatedTokenPrice:test_GetValidatedTokenPriceFromFeedOverStalenessPeriod_Success() (gas: 61896) -PriceRegistry_getValidatedTokenPrice:test_GetValidatedTokenPriceFromFeed_Success() (gas: 61776) -PriceRegistry_getValidatedTokenPrice:test_GetValidatedTokenPrice_Success() (gas: 60969) -PriceRegistry_getValidatedTokenPrice:test_OverflowFeedPrice_Revert() (gas: 2093741) -PriceRegistry_getValidatedTokenPrice:test_StaleFeeToken_Success() (gas: 61496) -PriceRegistry_getValidatedTokenPrice:test_TokenNotSupportedFeed_Revert() (gas: 109012) -PriceRegistry_getValidatedTokenPrice:test_TokenNotSupported_Revert() (gas: 13790) -PriceRegistry_getValidatedTokenPrice:test_UnderflowFeedPrice_Revert() (gas: 2092419) +PingPong_startPingPong:test_StartPingPong_Success() (gas: 178603) +PriceRegistry_applyFeeTokensUpdates:test_ApplyFeeTokensUpdates_Success() (gas: 80210) +PriceRegistry_applyFeeTokensUpdates:test_OnlyCallableByOwner_Revert() (gas: 12668) +PriceRegistry_applyPremiumMultiplierWeiPerEthUpdates:test_OnlyCallableByOwnerOrAdmin_Revert() (gas: 11465) +PriceRegistry_applyPremiumMultiplierWeiPerEthUpdates:test_applyPremiumMultiplierWeiPerEthUpdatesMultipleTokens_Success() (gas: 54149) +PriceRegistry_applyPremiumMultiplierWeiPerEthUpdates:test_applyPremiumMultiplierWeiPerEthUpdatesSingleToken_Success() (gas: 44835) +PriceRegistry_applyPremiumMultiplierWeiPerEthUpdates:test_applyPremiumMultiplierWeiPerEthUpdatesZeroInput() (gas: 12301) +PriceRegistry_applyTokenTransferFeeConfigUpdates:test_ApplyTokenTransferFeeConfig_Success() (gas: 86694) +PriceRegistry_applyTokenTransferFeeConfigUpdates:test_ApplyTokenTransferFeeZeroInput() (gas: 13067) +PriceRegistry_applyTokenTransferFeeConfigUpdates:test_InvalidDestBytesOverhead_Revert() (gas: 17023) +PriceRegistry_applyTokenTransferFeeConfigUpdates:test_OnlyCallableByOwnerOrAdmin_Revert() (gas: 12218) +PriceRegistry_constructor:test_Setup_Success() (gas: 4883254) +PriceRegistry_convertTokenAmount:test_ConvertTokenAmount_Success() (gas: 72751) +PriceRegistry_convertTokenAmount:test_LinkTokenNotSupported_Revert() (gas: 30981) +PriceRegistry_getDataAvailabilityCost:test_EmptyMessageCalculatesDataAvailabilityCost_Success() (gas: 95684) +PriceRegistry_getDataAvailabilityCost:test_SimpleMessageCalculatesDataAvailabilityCostUnsupportedDestChainSelector_Success() (gas: 14670) +PriceRegistry_getDataAvailabilityCost:test_SimpleMessageCalculatesDataAvailabilityCost_Success() (gas: 20699) +PriceRegistry_getTokenAndGasPrices:test_GetFeeTokenAndGasPrices_Success() (gas: 70449) +PriceRegistry_getTokenAndGasPrices:test_StaleGasPrice_Revert() (gas: 16838) +PriceRegistry_getTokenAndGasPrices:test_UnsupportedChain_Revert() (gas: 16140) +PriceRegistry_getTokenAndGasPrices:test_ZeroGasPrice_Success() (gas: 45603) +PriceRegistry_getTokenPrice:test_GetTokenPriceFromFeed_Success() (gas: 62245) +PriceRegistry_getTokenPrices:test_GetTokenPrices_Success() (gas: 84757) +PriceRegistry_getTokenTransferCost:test_CustomTokenBpsFee_Success() (gas: 41251) +PriceRegistry_getTokenTransferCost:test_FeeTokenBpsFee_Success() (gas: 34701) +PriceRegistry_getTokenTransferCost:test_LargeTokenTransferChargesMaxFeeAndGas_Success() (gas: 27775) +PriceRegistry_getTokenTransferCost:test_MixedTokenTransferFee_Success() (gas: 107790) +PriceRegistry_getTokenTransferCost:test_NoTokenTransferChargesZeroFee_Success() (gas: 20349) +PriceRegistry_getTokenTransferCost:test_SmallTokenTransferChargesMinFeeAndGas_Success() (gas: 27583) +PriceRegistry_getTokenTransferCost:test_WETHTokenBpsFee_Success() (gas: 40636) +PriceRegistry_getTokenTransferCost:test_ZeroAmountTokenTransferChargesMinFeeAndGas_Success() (gas: 27606) +PriceRegistry_getTokenTransferCost:test_ZeroFeeConfigChargesMinFee_Success() (gas: 39983) +PriceRegistry_getTokenTransferCost:test_getTokenTransferCost_selfServeUsesDefaults_Success() (gas: 29311) +PriceRegistry_getValidatedTokenPrice:test_GetValidatedTokenPriceFromFeedErc20Above18Decimals_Success() (gas: 2094488) +PriceRegistry_getValidatedTokenPrice:test_GetValidatedTokenPriceFromFeedErc20Below18Decimals_Success() (gas: 2094446) +PriceRegistry_getValidatedTokenPrice:test_GetValidatedTokenPriceFromFeedFeedAt0Decimals_Success() (gas: 2074565) +PriceRegistry_getValidatedTokenPrice:test_GetValidatedTokenPriceFromFeedFeedAt18Decimals_Success() (gas: 2094220) +PriceRegistry_getValidatedTokenPrice:test_GetValidatedTokenPriceFromFeedFlippedDecimals_Success() (gas: 2094424) +PriceRegistry_getValidatedTokenPrice:test_GetValidatedTokenPriceFromFeedMaxInt224Value_Success() (gas: 2094236) +PriceRegistry_getValidatedTokenPrice:test_GetValidatedTokenPriceFromFeedOverStalenessPeriod_Success() (gas: 61953) +PriceRegistry_getValidatedTokenPrice:test_GetValidatedTokenPriceFromFeed_Success() (gas: 61833) +PriceRegistry_getValidatedTokenPrice:test_GetValidatedTokenPrice_Success() (gas: 61020) +PriceRegistry_getValidatedTokenPrice:test_OverflowFeedPrice_Revert() (gas: 2093948) +PriceRegistry_getValidatedTokenPrice:test_StaleFeeToken_Success() (gas: 61547) +PriceRegistry_getValidatedTokenPrice:test_TokenNotSupportedFeed_Revert() (gas: 109069) +PriceRegistry_getValidatedTokenPrice:test_TokenNotSupported_Revert() (gas: 13841) +PriceRegistry_getValidatedTokenPrice:test_UnderflowFeedPrice_Revert() (gas: 2092626) +PriceRegistry_parseEVMExtraArgsFromBytes:test_EVMExtraArgsDefault_Success() (gas: 17296) +PriceRegistry_parseEVMExtraArgsFromBytes:test_EVMExtraArgsEnforceOutOfOrder_Revert() (gas: 21390) +PriceRegistry_parseEVMExtraArgsFromBytes:test_EVMExtraArgsGasLimitTooHigh_Revert() (gas: 18487) +PriceRegistry_parseEVMExtraArgsFromBytes:test_EVMExtraArgsInvalidExtraArgsTag_Revert() (gas: 18011) +PriceRegistry_parseEVMExtraArgsFromBytes:test_EVMExtraArgsV1_Success() (gas: 18388) +PriceRegistry_parseEVMExtraArgsFromBytes:test_EVMExtraArgsV2_Success() (gas: 18505) PriceRegistry_updatePrices:test_OnlyCallableByUpdaterOrOwner_Revert() (gas: 14240) -PriceRegistry_updatePrices:test_OnlyGasPrice_Success() (gas: 23436) -PriceRegistry_updatePrices:test_OnlyTokenPrice_Success() (gas: 30424) -PriceRegistry_updatePrices:test_UpdatableByAuthorizedCaller_Success() (gas: 89738) -PriceRegistry_updatePrices:test_UpdateMultiplePrices_Success() (gas: 151078) -PriceRegistry_updateTokenPriceFeeds:test_FeedNotUpdated() (gas: 50483) -PriceRegistry_updateTokenPriceFeeds:test_FeedUnset_Success() (gas: 63448) +PriceRegistry_updatePrices:test_OnlyGasPrice_Success() (gas: 23490) +PriceRegistry_updatePrices:test_OnlyTokenPrice_Success() (gas: 30506) +PriceRegistry_updatePrices:test_UpdatableByAuthorizedCaller_Success() (gas: 89840) +PriceRegistry_updatePrices:test_UpdateMultiplePrices_Success() (gas: 151456) +PriceRegistry_updateTokenPriceFeeds:test_FeedNotUpdated() (gas: 50501) +PriceRegistry_updateTokenPriceFeeds:test_FeedUnset_Success() (gas: 63618) PriceRegistry_updateTokenPriceFeeds:test_FeedUpdatedByNonOwner_Revert() (gas: 19932) -PriceRegistry_updateTokenPriceFeeds:test_MultipleFeedUpdate_Success() (gas: 88796) -PriceRegistry_updateTokenPriceFeeds:test_SingleFeedUpdate_Success() (gas: 50733) +PriceRegistry_updateTokenPriceFeeds:test_MultipleFeedUpdate_Success() (gas: 88832) +PriceRegistry_updateTokenPriceFeeds:test_SingleFeedUpdate_Success() (gas: 50751) PriceRegistry_updateTokenPriceFeeds:test_ZeroFeeds_Success() (gas: 12296) +PriceRegistry_validateDestFamilyAddress:test_InvalidEVMAddress_Revert() (gas: 10817) +PriceRegistry_validateDestFamilyAddress:test_ValidEVMAddress_Success() (gas: 6744) +PriceRegistry_validateDestFamilyAddress:test_ValidNonEVMAddress_Success() (gas: 6428) RMN_constructor:test_Constructor_Success() (gas: 48838) RMN_getRecordedCurseRelatedOps:test_OpsPostDeployment() (gas: 19666) RMN_lazyVoteToCurseUpdate_Benchmark:test_VoteToCurseLazilyRetain3VotersUponConfigChange_gas() (gas: 152152) @@ -819,24 +793,24 @@ Router_applyRampUpdates:test_OffRampMismatch_Revert() (gas: 89288) Router_applyRampUpdates:test_OffRampUpdatesWithRouting() (gas: 10642128) Router_applyRampUpdates:test_OnRampDisable() (gas: 55913) Router_applyRampUpdates:test_OnlyOwner_Revert() (gas: 12311) -Router_ccipSend:test_CCIPSendLinkFeeNoTokenSuccess_gas() (gas: 114092) -Router_ccipSend:test_CCIPSendLinkFeeOneTokenSuccess_gas() (gas: 200929) -Router_ccipSend:test_CCIPSendNativeFeeNoTokenSuccess_gas() (gas: 128700) -Router_ccipSend:test_CCIPSendNativeFeeOneTokenSuccess_gas() (gas: 215539) -Router_ccipSend:test_FeeTokenAmountTooLow_Revert() (gas: 66251) +Router_ccipSend:test_CCIPSendLinkFeeNoTokenSuccess_gas() (gas: 114120) +Router_ccipSend:test_CCIPSendLinkFeeOneTokenSuccess_gas() (gas: 200957) +Router_ccipSend:test_CCIPSendNativeFeeNoTokenSuccess_gas() (gas: 128767) +Router_ccipSend:test_CCIPSendNativeFeeOneTokenSuccess_gas() (gas: 215606) +Router_ccipSend:test_FeeTokenAmountTooLow_Revert() (gas: 66279) Router_ccipSend:test_InvalidMsgValue() (gas: 31963) -Router_ccipSend:test_NativeFeeTokenInsufficientValue() (gas: 68687) -Router_ccipSend:test_NativeFeeTokenOverpay_Success() (gas: 173773) -Router_ccipSend:test_NativeFeeTokenZeroValue() (gas: 56013) -Router_ccipSend:test_NativeFeeToken_Success() (gas: 172367) -Router_ccipSend:test_NonLinkFeeToken_Success() (gas: 242902) +Router_ccipSend:test_NativeFeeTokenInsufficientValue() (gas: 68715) +Router_ccipSend:test_NativeFeeTokenOverpay_Success() (gas: 173868) +Router_ccipSend:test_NativeFeeTokenZeroValue() (gas: 56041) +Router_ccipSend:test_NativeFeeToken_Success() (gas: 172462) +Router_ccipSend:test_NonLinkFeeToken_Success() (gas: 243057) Router_ccipSend:test_UnsupportedDestinationChain_Revert() (gas: 24749) Router_ccipSend:test_WhenNotHealthy_Revert() (gas: 44724) -Router_ccipSend:test_WrappedNativeFeeToken_Success() (gas: 174583) -Router_ccipSend:test_ZeroFeeAndGasPrice_Success() (gas: 243149) +Router_ccipSend:test_WrappedNativeFeeToken_Success() (gas: 174678) +Router_ccipSend:test_ZeroFeeAndGasPrice_Success() (gas: 243344) Router_constructor:test_Constructor_Success() (gas: 13074) Router_getArmProxy:test_getArmProxy() (gas: 10561) -Router_getFee:test_GetFeeSupportedChain_Success() (gas: 46440) +Router_getFee:test_GetFeeSupportedChain_Success() (gas: 46468) Router_getFee:test_UnsupportedDestinationChain_Revert() (gas: 17138) Router_getSupportedTokens:test_GetSupportedTokens_Revert() (gas: 10460) Router_recoverTokens:test_RecoverTokensInvalidRecipient_Revert() (gas: 11316) @@ -851,7 +825,7 @@ Router_routeMessage:test_OnlyOffRamp_Revert() (gas: 25116) Router_routeMessage:test_WhenNotHealthy_Revert() (gas: 44724) Router_setWrappedNative:test_OnlyOwner_Revert() (gas: 10985) SelfFundedPingPong_ccipReceive:test_FundingIfNotANop_Revert() (gas: 53600) -SelfFundedPingPong_ccipReceive:test_Funding_Success() (gas: 418231) +SelfFundedPingPong_ccipReceive:test_Funding_Success() (gas: 418399) SelfFundedPingPong_setCountIncrBeforeFunding:test_setCountIncrBeforeFunding() (gas: 20157) TokenAdminRegistry_acceptAdminRole:test_acceptAdminRole_OnlyPendingAdministrator_Revert() (gas: 51085) TokenAdminRegistry_acceptAdminRole:test_acceptAdminRole_Success() (gas: 43947) @@ -877,8 +851,8 @@ TokenAdminRegistry_transferAdminRole:test_transferAdminRole_OnlyAdministrator_Re TokenAdminRegistry_transferAdminRole:test_transferAdminRole_Success() (gas: 49390) TokenPoolAndProxy:test_lockOrBurn_burnMint_Success() (gas: 6037815) TokenPoolAndProxy:test_lockOrBurn_lockRelease_Success() (gas: 6283571) -TokenPoolAndProxyMigration:test_tokenPoolMigration_Success_1_2() (gas: 6885180) -TokenPoolAndProxyMigration:test_tokenPoolMigration_Success_1_4() (gas: 7069295) +TokenPoolAndProxyMigration:test_tokenPoolMigration_Success_1_2() (gas: 6885264) +TokenPoolAndProxyMigration:test_tokenPoolMigration_Success_1_4() (gas: 7069379) TokenPoolWithAllowList_applyAllowListUpdates:test_AllowListNotEnabled_Revert() (gas: 2169749) TokenPoolWithAllowList_applyAllowListUpdates:test_OnlyOwner_Revert() (gas: 12089) TokenPoolWithAllowList_applyAllowListUpdates:test_SetAllowListSkipsZero_Success() (gas: 23280) @@ -907,16 +881,16 @@ TokenPool_setRemotePool:test_setRemotePool_NonExistentChain_Reverts() (gas: 1559 TokenPool_setRemotePool:test_setRemotePool_OnlyOwner_Reverts() (gas: 13173) TokenPool_setRemotePool:test_setRemotePool_Success() (gas: 281890) TokenProxy_ccipSend:test_CcipSendGasShouldBeZero_Revert() (gas: 17109) -TokenProxy_ccipSend:test_CcipSendInsufficientAllowance_Revert() (gas: 136327) +TokenProxy_ccipSend:test_CcipSendInsufficientAllowance_Revert() (gas: 136355) TokenProxy_ccipSend:test_CcipSendInvalidToken_Revert() (gas: 15919) -TokenProxy_ccipSend:test_CcipSendNative_Success() (gas: 244739) +TokenProxy_ccipSend:test_CcipSendNative_Success() (gas: 244806) TokenProxy_ccipSend:test_CcipSendNoDataAllowed_Revert() (gas: 16303) -TokenProxy_ccipSend:test_CcipSend_Success() (gas: 261316) +TokenProxy_ccipSend:test_CcipSend_Success() (gas: 261361) TokenProxy_constructor:test_Constructor() (gas: 13812) TokenProxy_getFee:test_GetFeeGasShouldBeZero_Revert() (gas: 16827) TokenProxy_getFee:test_GetFeeInvalidToken_Revert() (gas: 12658) TokenProxy_getFee:test_GetFeeNoDataAllowed_Revert() (gas: 15849) -TokenProxy_getFee:test_GetFee_Success() (gas: 86900) +TokenProxy_getFee:test_GetFee_Success() (gas: 86956) USDCTokenPool__validateMessage:test_ValidateInvalidMessage_Revert() (gas: 24960) USDCTokenPool_lockOrBurn:test_CallerIsNotARampOnRouter_Revert() (gas: 35332) USDCTokenPool_lockOrBurn:test_LockOrBurnWithAllowList_Revert() (gas: 30075) diff --git a/contracts/src/v0.8/ccip/PriceRegistry.sol b/contracts/src/v0.8/ccip/PriceRegistry.sol index e1baf1a345..8ace43d13e 100644 --- a/contracts/src/v0.8/ccip/PriceRegistry.sol +++ b/contracts/src/v0.8/ccip/PriceRegistry.sol @@ -6,7 +6,9 @@ import {IPriceRegistry} from "./interfaces/IPriceRegistry.sol"; import {AuthorizedCallers} from "../shared/access/AuthorizedCallers.sol"; import {AggregatorV3Interface} from "./../shared/interfaces/AggregatorV3Interface.sol"; +import {Client} from "./libraries/Client.sol"; import {Internal} from "./libraries/Internal.sol"; +import {Pool} from "./libraries/Pool.sol"; import {USDPriceWith18Decimals} from "./libraries/USDPriceWith18Decimals.sol"; import {EnumerableSet} from "../vendor/openzeppelin-solidity/v4.8.3/contracts/utils/structs/EnumerableSet.sol"; @@ -24,11 +26,31 @@ contract PriceRegistry is AuthorizedCallers, IPriceRegistry, ITypeAndVersion { IPriceRegistry.TokenPriceFeedConfig feedConfig; // Feed config update data } + /// @dev Struct that contains the static configuration + /// RMN depends on this struct, if changing, please notify the RMN maintainers. + // solhint-disable-next-line gas-struct-packing + struct StaticConfig { + uint96 maxFeeJuelsPerMsg; // ─╮ Maximum fee that can be charged for a message + address linkToken; // ────────╯ LINK token address + uint32 stalenessThreshold; // The amount of time a gas price can be stale before it is considered invalid. + } + error TokenNotSupported(address token); error ChainNotSupported(uint64 chain); error StaleGasPrice(uint64 destChainSelector, uint256 threshold, uint256 timePassed); - error InvalidStalenessThreshold(); error DataFeedValueOutOfUint224Range(); + error NotAFeeToken(address token); + error InvalidDestBytesOverhead(address token, uint32 destBytesOverhead); + error MessageGasLimitTooHigh(); + error DestinationChainNotEnabled(uint64 destChainSelector); + error ExtraArgOutOfOrderExecutionMustBeTrue(); + error InvalidExtraArgsTag(); + error SourceTokenDataTooLarge(address token); + error InvalidDestChainConfig(uint64 destChainSelector); + error MessageFeeTooHigh(uint256 msgFeeJuels, uint256 maxFeeJuelsPerMsg); + error InvalidStaticConfig(); + error MessageTooLarge(uint256 maxSize, uint256 actualSize); + error UnsupportedNumberOfTokens(); event PriceUpdaterSet(address indexed priceUpdater); event PriceUpdaterRemoved(address indexed priceUpdater); @@ -38,6 +60,86 @@ contract PriceRegistry is AuthorizedCallers, IPriceRegistry, ITypeAndVersion { event UsdPerTokenUpdated(address indexed token, uint256 value, uint256 timestamp); event PriceFeedPerTokenUpdated(address indexed token, IPriceRegistry.TokenPriceFeedConfig priceFeedConfig); + event TokenTransferFeeConfigUpdated( + uint64 indexed destChainSelector, address indexed token, TokenTransferFeeConfig tokenTransferFeeConfig + ); + event TokenTransferFeeConfigDeleted(uint64 indexed destChainSelector, address indexed token); + event PremiumMultiplierWeiPerEthUpdated(address indexed token, uint64 premiumMultiplierWeiPerEth); + event DestChainDynamicConfigUpdated(uint64 indexed destChainSelector, DestChainDynamicConfig dynamicConfig); + event DestChainAdded(uint64 indexed destChainSelector, DestChainDynamicConfig dynamicConfig); + + /// @dev Struct to hold the dynamic fee & validation configs for a destination chain + struct DestChainDynamicConfig { + bool isEnabled; // ──────────────────────────╮ Whether this destination chain is enabled + uint16 maxNumberOfTokensPerMsg; // │ Maximum number of distinct ERC20 token transferred per message + uint32 maxDataBytes; // │ Maximum payload data size in bytes + uint32 maxPerMsgGasLimit; // │ Maximum gas limit for messages targeting EVMs + uint32 destGasOverhead; // │ Gas charged on top of the gasLimit to cover destination chain costs + uint16 destGasPerPayloadByte; // │ Destination chain gas charged for passing each byte of `data` payload to receiver + uint32 destDataAvailabilityOverheadGas; // | Extra data availability gas charged on top of the message, e.g. for OCR + uint16 destGasPerDataAvailabilityByte; // | Amount of gas to charge per byte of message data that needs availability + uint16 destDataAvailabilityMultiplierBps; // │ Multiplier for data availability gas, multiples of bps, or 0.0001 + // The following three properties are defaults, they can be overridden by setting the TokenTransferFeeConfig for a token + uint16 defaultTokenFeeUSDCents; // │ Default token fee charged per token transfer + uint32 defaultTokenDestGasOverhead; // ──────╯ Default gas charged to execute the token transfer on the destination chain + uint32 defaultTokenDestBytesOverhead; // ────╮ Default extra data availability bytes charged per token transfer + uint64 defaultTxGasLimit; // │ Default gas limit for a tx + uint64 gasMultiplierWeiPerEth; // │ Multiplier for gas costs, 1e18 based so 11e17 = 10% extra cost. + uint32 networkFeeUSDCents; // │ Flat network fee to charge for messages, multiples of 0.01 USD + bool enforceOutOfOrder; // │ Whether to enforce the allowOutOfOrderExecution extraArg value to be true. + bytes4 chainFamilySelector; // ──────────────╯ Selector that identifies the destination chain's family. Used to determine the correct validations to perform for the dest chain. + } + + /// @dev Struct to hold the dynamic configs and its destination chain selector + /// Same as DestChainConfig but with the destChainSelector so that an array of these + /// can be passed in the constructor and the applyDestChainDynamicConfigUpdates function + //solhint-disable gas-struct-packing + struct DestChainDynamicConfigArgs { + uint64 destChainSelector; // Destination chain selector + DestChainDynamicConfig dynamicConfig; // Dynamic config to update for the chain selector + } + + /// @dev Struct to hold the transfer fee configuration for token transfers + struct TokenTransferFeeConfig { + uint32 minFeeUSDCents; // ──────────╮ Minimum fee to charge per token transfer, multiples of 0.01 USD + uint32 maxFeeUSDCents; // │ Maximum fee to charge per token transfer, multiples of 0.01 USD + uint16 deciBps; // │ Basis points charged on token transfers, multiples of 0.1bps, or 1e-5 + uint32 destGasOverhead; // │ Gas charged to execute the token transfer on the destination chain + // │ Extra data availability bytes that are returned from the source pool and sent + uint32 destBytesOverhead; // │ to the destination pool. Must be >= Pool.CCIP_LOCK_OR_BURN_V1_RET_BYTES + bool isEnabled; // ─────────────────╯ Whether this token has custom transfer fees + } + + /// @dev Struct to hold the token transfer fee configurations for a token, same as TokenTransferFeeConfig but with the token address included so + /// that an array of these can be passed in the TokenTransferFeeConfigArgs struct to set the mapping + struct TokenTransferFeeConfigSingleTokenArgs { + address token; // Token address + TokenTransferFeeConfig tokenTransferFeeConfig; // struct to hold the transfer fee configuration for token transfers + } + + /// @dev Struct to hold the token transfer fee configurations for a destination chain and a set of tokens. Same as TokenTransferFeeConfigSingleTokenArgs + /// but with the destChainSelector and an array of TokenTransferFeeConfigSingleTokenArgs included so that an array of these can be passed in the constructor + /// and the applyTokenTransferFeeConfigUpdates function + struct TokenTransferFeeConfigArgs { + uint64 destChainSelector; // Destination chain selector + TokenTransferFeeConfigSingleTokenArgs[] tokenTransferFeeConfigs; // Array of token transfer fee configurations + } + + /// @dev Struct to hold a pair of destination chain selector and token address so that an array of these can be passed in the + /// applyTokenTransferFeeConfigUpdates function to remove the token transfer fee configuration for a token + struct TokenTransferFeeConfigRemoveArgs { + uint64 destChainSelector; // ─╮ Destination chain selector + address token; // ────────────╯ Token address + } + + /// @dev Struct to hold the fee token configuration for a token, same as the s_premiumMultiplierWeiPerEth but with + /// the token address included so that an array of these can be passed in the constructor and + /// applyPremiumMultiplierWeiPerEthUpdates to set the mapping + struct PremiumMultiplierWeiPerEthArgs { + address token; // // ───────────────────╮ Token address + uint64 premiumMultiplierWeiPerEth; // ──╯ Multiplier for destination chain specific premiums. Should never be 0 so can be used as an isEnabled flag + } + string public constant override typeAndVersion = "PriceRegistry 1.6.0-dev"; /// @dev The gas price per unit of gas for a given destination chain, in USD with 18 decimals. @@ -61,6 +163,22 @@ contract PriceRegistry is AuthorizedCallers, IPriceRegistry, ITypeAndVersion { /// @dev Stores the price data feed configurations per token. mapping(address token => IPriceRegistry.TokenPriceFeedConfig dataFeedAddress) private s_usdPriceFeedsPerToken; + /// @dev The multiplier for destination chain specific premiums that can be set by the owner or fee admin + /// This should never be 0 once set, so it can be used as an isEnabled flag + mapping(address token => uint64 premiumMultiplierWeiPerEth) internal s_premiumMultiplierWeiPerEth; + + /// @dev The destination chain specific fee configs + mapping(uint64 destChainSelector => DestChainDynamicConfig destChainDynamicConfig) internal s_destChainDynamicConfigs; + + /// @dev The token transfer fee config that can be set by the owner or fee admin + mapping(uint64 destChainSelector => mapping(address token => TokenTransferFeeConfig tranferFeeConfig)) internal + s_tokenTransferFeeConfig; + + /// @dev Maximum fee that can be charged for a message. This is a guard to prevent massively overcharging due to misconfiguation. + uint96 internal immutable i_maxFeeJuelsPerMsg; + /// @dev The link token address + address internal immutable i_linkToken; + // Price updaters are allowed to update the prices. EnumerableSet.AddressSet private s_priceUpdaters; // Subset of tokens which prices tracked by this registry which are fee tokens. @@ -69,15 +187,30 @@ contract PriceRegistry is AuthorizedCallers, IPriceRegistry, ITypeAndVersion { uint32 private immutable i_stalenessThreshold; constructor( + StaticConfig memory staticConfig, address[] memory priceUpdaters, address[] memory feeTokens, - uint32 stalenessThreshold, - TokenPriceFeedUpdate[] memory tokenPriceFeeds + TokenPriceFeedUpdate[] memory tokenPriceFeeds, + TokenTransferFeeConfigArgs[] memory tokenTransferFeeConfigArgs, + PremiumMultiplierWeiPerEthArgs[] memory premiumMultiplierWeiPerEthArgs, + DestChainDynamicConfigArgs[] memory destChainConfigArgs ) AuthorizedCallers(priceUpdaters) { + if ( + staticConfig.linkToken == address(0) || staticConfig.maxFeeJuelsPerMsg == 0 + || staticConfig.stalenessThreshold == 0 + ) { + revert InvalidStaticConfig(); + } + + i_linkToken = staticConfig.linkToken; + i_maxFeeJuelsPerMsg = staticConfig.maxFeeJuelsPerMsg; + i_stalenessThreshold = staticConfig.stalenessThreshold; + _applyFeeTokensUpdates(feeTokens, new address[](0)); _updateTokenPriceFeeds(tokenPriceFeeds); - if (stalenessThreshold == 0) revert InvalidStalenessThreshold(); - i_stalenessThreshold = stalenessThreshold; + _applyDestChainConfigUpdates(destChainConfigArgs); + _applyPremiumMultiplierWeiPerEthUpdates(premiumMultiplierWeiPerEthArgs); + _applyTokenTransferFeeConfigUpdates(tokenTransferFeeConfigArgs, new TokenTransferFeeConfigRemoveArgs[](0)); } // ================================================================ @@ -124,12 +257,6 @@ contract PriceRegistry is AuthorizedCallers, IPriceRegistry, ITypeAndVersion { return s_usdPriceFeedsPerToken[token]; } - /// @notice Get the staleness threshold. - /// @return stalenessThreshold The staleness threshold. - function getStalenessThreshold() external view returns (uint128) { - return i_stalenessThreshold; - } - /// @inheritdoc IPriceRegistry function getDestinationChainGasPrice(uint64 destChainSelector) external @@ -144,7 +271,7 @@ contract PriceRegistry is AuthorizedCallers, IPriceRegistry, ITypeAndVersion { function getTokenAndGasPrices( address token, uint64 destChainSelector - ) external view override returns (uint224 tokenPrice, uint224 gasPriceValue) { + ) public view override returns (uint224 tokenPrice, uint224 gasPriceValue) { Internal.TimestampedPackedUint224 memory gasPrice = s_usdPerUnitGasByDestChainSelector[destChainSelector]; // We do allow a gas price of 0, but no stale or unset gas prices if (gasPrice.timestamp == 0) revert ChainNotSupported(destChainSelector); @@ -162,7 +289,7 @@ contract PriceRegistry is AuthorizedCallers, IPriceRegistry, ITypeAndVersion { address fromToken, uint256 fromTokenAmount, address toToken - ) external view override returns (uint256) { + ) public view override returns (uint256) { /// Example: /// fromTokenAmount: 1e18 // 1 ETH /// ETH: 2_000e18 @@ -311,6 +438,443 @@ contract PriceRegistry is AuthorizedCallers, IPriceRegistry, ITypeAndVersion { } } + // ================================================================ + // │ Fee quoting │ + // ================================================================ + + /// @inheritdoc IPriceRegistry + /// @dev The function should always validate message.extraArgs, message.receiver and family-specific configs + function getValidatedFee( + uint64 destChainSelector, + Client.EVM2AnyMessage calldata message + ) external view returns (uint256 feeTokenAmount) { + // Verify that the config is present (a 0 family chain selector impleis an unconfigured dest chain) + DestChainDynamicConfig storage destChainDynamicConfig = s_destChainDynamicConfigs[destChainSelector]; + + if (!destChainDynamicConfig.isEnabled) revert DestinationChainNotEnabled(destChainSelector); + + uint256 numberOfTokens = message.tokenAmounts.length; + _validateMessage(destChainDynamicConfig, message.data.length, numberOfTokens, message.receiver); + + uint64 premiumMultiplierWeiPerEth = s_premiumMultiplierWeiPerEth[message.feeToken]; + + // premiumMultiplierWeiPerEth should never be 0 so it can be used as an isEnabled flag + if (premiumMultiplierWeiPerEth == 0) revert NotAFeeToken(message.feeToken); + + (uint224 feeTokenPrice, uint224 packedGasPrice) = getTokenAndGasPrices(message.feeToken, destChainSelector); + + // Calculate premiumFee in USD with 18 decimals precision first. + // If message-only and no token transfers, a flat network fee is charged. + // If there are token transfers, premiumFee is calculated from token transfer fee. + // If there are both token transfers and message, premiumFee is only calculated from token transfer fee. + uint256 premiumFee = 0; + uint32 tokenTransferGas = 0; + uint32 tokenTransferBytesOverhead = 0; + if (numberOfTokens > 0) { + (premiumFee, tokenTransferGas, tokenTransferBytesOverhead) = _getTokenTransferCost( + destChainDynamicConfig, destChainSelector, message.feeToken, feeTokenPrice, message.tokenAmounts + ); + } else { + // Convert USD cents with 2 decimals to 18 decimals. + premiumFee = uint256(destChainDynamicConfig.networkFeeUSDCents) * 1e16; + } + + // Calculate data availability cost in USD with 36 decimals. Data availability cost exists on rollups that need to post + // transaction calldata onto another storage layer, e.g. Eth mainnet, incurring additional storage gas costs. + uint256 dataAvailabilityCost = 0; + + // Only calculate data availability cost if data availability multiplier is non-zero. + // The multiplier should be set to 0 if destination chain does not charge data availability cost. + if (destChainDynamicConfig.destDataAvailabilityMultiplierBps > 0) { + dataAvailabilityCost = _getDataAvailabilityCost( + destChainDynamicConfig, + // Parse the data availability gas price stored in the higher-order 112 bits of the encoded gas price. + uint112(packedGasPrice >> Internal.GAS_PRICE_BITS), + message.data.length, + numberOfTokens, + tokenTransferBytesOverhead + ); + } + + // Calculate execution gas fee on destination chain in USD with 36 decimals. + // We add the message gas limit, the overhead gas, the gas of passing message data to receiver, and token transfer gas together. + // We then multiply this gas total with the gas multiplier and gas price, converting it into USD with 36 decimals. + // uint112(packedGasPrice) = executionGasPrice + + // NOTE: when supporting non-EVM chains, revisit how generic this fee logic can be + + uint256 executionGasCost = destChainDynamicConfig.destGasOverhead + + (message.data.length * destChainDynamicConfig.destGasPerPayloadByte) + tokenTransferGas; + + // NOTE: when supporting non-EVM chains, revisit this and parse non-EVM args + executionGasCost += _parseEVMExtraArgsFromBytes(message.extraArgs, destChainDynamicConfig).gasLimit; + + uint256 executionCost = uint112(packedGasPrice) * executionGasCost * destChainDynamicConfig.gasMultiplierWeiPerEth; + + // Calculate number of fee tokens to charge. + // Total USD fee is in 36 decimals, feeTokenPrice is in 18 decimals USD for 1e18 smallest token denominations. + // Result of the division is the number of smallest token denominations. + return ((premiumFee * premiumMultiplierWeiPerEth) + executionCost + dataAvailabilityCost) / feeTokenPrice; + } + + /// @notice Sets the fee configuration for a token + /// @param premiumMultiplierWeiPerEthArgs Array of PremiumMultiplierWeiPerEthArgs structs. + function applyPremiumMultiplierWeiPerEthUpdates( + PremiumMultiplierWeiPerEthArgs[] memory premiumMultiplierWeiPerEthArgs + ) external onlyOwner { + _applyPremiumMultiplierWeiPerEthUpdates(premiumMultiplierWeiPerEthArgs); + } + + /// @dev Set the fee config. + /// @param premiumMultiplierWeiPerEthArgs The multiplier for destination chain specific premiums. + function _applyPremiumMultiplierWeiPerEthUpdates( + PremiumMultiplierWeiPerEthArgs[] memory premiumMultiplierWeiPerEthArgs + ) internal { + for (uint256 i = 0; i < premiumMultiplierWeiPerEthArgs.length; ++i) { + address token = premiumMultiplierWeiPerEthArgs[i].token; + uint64 premiumMultiplierWeiPerEth = premiumMultiplierWeiPerEthArgs[i].premiumMultiplierWeiPerEth; + s_premiumMultiplierWeiPerEth[token] = premiumMultiplierWeiPerEth; + + emit PremiumMultiplierWeiPerEthUpdated(token, premiumMultiplierWeiPerEth); + } + } + + /// @notice Gets the fee configuration for a token. + /// @param token The token to get the fee configuration for. + /// @return premiumMultiplierWeiPerEth The multiplier for destination chain specific premiums. + function getPremiumMultiplierWeiPerEth(address token) external view returns (uint64 premiumMultiplierWeiPerEth) { + return s_premiumMultiplierWeiPerEth[token]; + } + + /// @notice Returns the token transfer cost parameters. + /// A basis point fee is calculated from the USD value of each token transfer. + /// For each individual transfer, this fee is between [minFeeUSD, maxFeeUSD]. + /// Total transfer fee is the sum of each individual token transfer fee. + /// @dev Assumes that tokenAmounts are validated to be listed tokens elsewhere. + /// @dev Splitting one token transfer into multiple transfers is discouraged, + /// as it will result in a transferFee equal or greater than the same amount aggregated/de-duped. + /// @param destChainDynamicConfig the dynamic config configured for the destination chain selector. + /// @param destChainSelector the destination chain selector. + /// @param feeToken address of the feeToken. + /// @param feeTokenPrice price of feeToken in USD with 18 decimals. + /// @param tokenAmounts token transfers in the message. + /// @return tokenTransferFeeUSDWei total token transfer bps fee in USD with 18 decimals. + /// @return tokenTransferGas total execution gas of the token transfers. + /// @return tokenTransferBytesOverhead additional token transfer data passed to destination, e.g. USDC attestation. + function _getTokenTransferCost( + DestChainDynamicConfig memory destChainDynamicConfig, + uint64 destChainSelector, + address feeToken, + uint224 feeTokenPrice, + Client.EVMTokenAmount[] calldata tokenAmounts + ) internal view returns (uint256 tokenTransferFeeUSDWei, uint32 tokenTransferGas, uint32 tokenTransferBytesOverhead) { + uint256 numberOfTokens = tokenAmounts.length; + + for (uint256 i = 0; i < numberOfTokens; ++i) { + Client.EVMTokenAmount memory tokenAmount = tokenAmounts[i]; + TokenTransferFeeConfig memory transferFeeConfig = s_tokenTransferFeeConfig[destChainSelector][tokenAmount.token]; + + // If the token has no specific overrides configured, we use the global defaults. + if (!transferFeeConfig.isEnabled) { + tokenTransferFeeUSDWei += uint256(destChainDynamicConfig.defaultTokenFeeUSDCents) * 1e16; + tokenTransferGas += destChainDynamicConfig.defaultTokenDestGasOverhead; + tokenTransferBytesOverhead += destChainDynamicConfig.defaultTokenDestBytesOverhead; + continue; + } + + uint256 bpsFeeUSDWei = 0; + // Only calculate bps fee if ratio is greater than 0. Ratio of 0 means no bps fee for a token. + // Useful for when the PriceRegistry cannot return a valid price for the token. + if (transferFeeConfig.deciBps > 0) { + uint224 tokenPrice = 0; + if (tokenAmount.token != feeToken) { + tokenPrice = _getValidatedTokenPrice(tokenAmount.token); + } else { + tokenPrice = feeTokenPrice; + } + + // Calculate token transfer value, then apply fee ratio + // ratio represents multiples of 0.1bps, or 1e-5 + bpsFeeUSDWei = (tokenPrice._calcUSDValueFromTokenAmount(tokenAmount.amount) * transferFeeConfig.deciBps) / 1e5; + } + + tokenTransferGas += transferFeeConfig.destGasOverhead; + tokenTransferBytesOverhead += transferFeeConfig.destBytesOverhead; + + // Bps fees should be kept within range of [minFeeUSD, maxFeeUSD]. + // Convert USD values with 2 decimals to 18 decimals. + uint256 minFeeUSDWei = uint256(transferFeeConfig.minFeeUSDCents) * 1e16; + if (bpsFeeUSDWei < minFeeUSDWei) { + tokenTransferFeeUSDWei += minFeeUSDWei; + continue; + } + + uint256 maxFeeUSDWei = uint256(transferFeeConfig.maxFeeUSDCents) * 1e16; + if (bpsFeeUSDWei > maxFeeUSDWei) { + tokenTransferFeeUSDWei += maxFeeUSDWei; + continue; + } + + tokenTransferFeeUSDWei += bpsFeeUSDWei; + } + + return (tokenTransferFeeUSDWei, tokenTransferGas, tokenTransferBytesOverhead); + } + + /// @notice Returns the estimated data availability cost of the message. + /// @dev To save on gas, we use a single destGasPerDataAvailabilityByte value for both zero and non-zero bytes. + /// @param destChainDynamicConfig the dynamic config configured for the destination chain selector. + /// @param dataAvailabilityGasPrice USD per data availability gas in 18 decimals. + /// @param messageDataLength length of the data field in the message. + /// @param numberOfTokens number of distinct token transfers in the message. + /// @param tokenTransferBytesOverhead additional token transfer data passed to destination, e.g. USDC attestation. + /// @return dataAvailabilityCostUSD36Decimal total data availability cost in USD with 36 decimals. + function _getDataAvailabilityCost( + DestChainDynamicConfig memory destChainDynamicConfig, + uint112 dataAvailabilityGasPrice, + uint256 messageDataLength, + uint256 numberOfTokens, + uint32 tokenTransferBytesOverhead + ) internal pure returns (uint256 dataAvailabilityCostUSD36Decimal) { + // dataAvailabilityLengthBytes sums up byte lengths of fixed message fields and dynamic message fields. + // Fixed message fields do account for the offset and length slot of the dynamic fields. + uint256 dataAvailabilityLengthBytes = Internal.ANY_2_EVM_MESSAGE_FIXED_BYTES + messageDataLength + + (numberOfTokens * Internal.ANY_2_EVM_MESSAGE_FIXED_BYTES_PER_TOKEN) + tokenTransferBytesOverhead; + + // destDataAvailabilityOverheadGas is a separate config value for flexibility to be updated independently of message cost. + // Its value is determined by CCIP lane implementation, e.g. the overhead data posted for OCR. + uint256 dataAvailabilityGas = (dataAvailabilityLengthBytes * destChainDynamicConfig.destGasPerDataAvailabilityByte) + + destChainDynamicConfig.destDataAvailabilityOverheadGas; + + // dataAvailabilityGasPrice is in 18 decimals, destDataAvailabilityMultiplierBps is in 4 decimals + // We pad 14 decimals to bring the result to 36 decimals, in line with token bps and execution fee. + return ((dataAvailabilityGas * dataAvailabilityGasPrice) * destChainDynamicConfig.destDataAvailabilityMultiplierBps) + * 1e14; + } + + /// @notice Gets the transfer fee config for a given token. + /// @param destChainSelector The destination chain selector. + /// @param token The token address. + function getTokenTransferFeeConfig( + uint64 destChainSelector, + address token + ) external view returns (TokenTransferFeeConfig memory tokenTransferFeeConfig) { + return s_tokenTransferFeeConfig[destChainSelector][token]; + } + + /// @notice Sets the transfer fee config. + /// @dev only callable by the owner or admin. + function applyTokenTransferFeeConfigUpdates( + TokenTransferFeeConfigArgs[] memory tokenTransferFeeConfigArgs, + TokenTransferFeeConfigRemoveArgs[] memory tokensToUseDefaultFeeConfigs + ) external onlyOwner { + _applyTokenTransferFeeConfigUpdates(tokenTransferFeeConfigArgs, tokensToUseDefaultFeeConfigs); + } + + /// @notice internal helper to set the token transfer fee config. + function _applyTokenTransferFeeConfigUpdates( + TokenTransferFeeConfigArgs[] memory tokenTransferFeeConfigArgs, + TokenTransferFeeConfigRemoveArgs[] memory tokensToUseDefaultFeeConfigs + ) internal { + for (uint256 i = 0; i < tokenTransferFeeConfigArgs.length; ++i) { + TokenTransferFeeConfigArgs memory tokenTransferFeeConfigArg = tokenTransferFeeConfigArgs[i]; + uint64 destChainSelector = tokenTransferFeeConfigArg.destChainSelector; + + for (uint256 j = 0; j < tokenTransferFeeConfigArg.tokenTransferFeeConfigs.length; ++j) { + TokenTransferFeeConfig memory tokenTransferFeeConfig = + tokenTransferFeeConfigArg.tokenTransferFeeConfigs[j].tokenTransferFeeConfig; + address token = tokenTransferFeeConfigArg.tokenTransferFeeConfigs[j].token; + + if (tokenTransferFeeConfig.destBytesOverhead < Pool.CCIP_LOCK_OR_BURN_V1_RET_BYTES) { + revert InvalidDestBytesOverhead(token, tokenTransferFeeConfig.destBytesOverhead); + } + + s_tokenTransferFeeConfig[destChainSelector][token] = tokenTransferFeeConfig; + + emit TokenTransferFeeConfigUpdated(destChainSelector, token, tokenTransferFeeConfig); + } + } + + // Remove the custom fee configs for the tokens that are in the tokensToUseDefaultFeeConfigs array + for (uint256 i = 0; i < tokensToUseDefaultFeeConfigs.length; ++i) { + uint64 destChainSelector = tokensToUseDefaultFeeConfigs[i].destChainSelector; + address token = tokensToUseDefaultFeeConfigs[i].token; + delete s_tokenTransferFeeConfig[destChainSelector][token]; + emit TokenTransferFeeConfigDeleted(destChainSelector, token); + } + } + + /// @notice Validates that the destAddress matches the expected format of the family. + /// @param chainFamilySelector Tag to identify the target family + /// @param destAddress Dest address to validate + /// @dev precondition - assumes the family tag is correct and validated + function _validateDestFamilyAddress(bytes4 chainFamilySelector, bytes memory destAddress) internal pure { + if (chainFamilySelector == Internal.CHAIN_FAMILY_SELECTOR_EVM) { + Internal._validateEVMAddress(destAddress); + } + } + + /// @dev Convert the extra args bytes into a struct with validations against the dest chain config + /// @param extraArgs The extra args bytes + /// @param destChainDynamicConfig Dest chain config to validate against + /// @return EVMExtraArgs the extra args struct (latest version) + function _parseEVMExtraArgsFromBytes( + bytes calldata extraArgs, + DestChainDynamicConfig memory destChainDynamicConfig + ) internal pure returns (Client.EVMExtraArgsV2 memory) { + Client.EVMExtraArgsV2 memory evmExtraArgs = + _parseUnvalidatedEVMExtraArgsFromBytes(extraArgs, destChainDynamicConfig.defaultTxGasLimit); + + if (evmExtraArgs.gasLimit > uint256(destChainDynamicConfig.maxPerMsgGasLimit)) revert MessageGasLimitTooHigh(); + if (destChainDynamicConfig.enforceOutOfOrder && !evmExtraArgs.allowOutOfOrderExecution) { + revert ExtraArgOutOfOrderExecutionMustBeTrue(); + } + + return evmExtraArgs; + } + + /// @dev Convert the extra args bytes into a struct + /// @param extraArgs The extra args bytes + /// @param defaultTxGasLimit default tx gas limit to use in the absence of extra args + /// @return EVMExtraArgs the extra args struct (latest version) + function _parseUnvalidatedEVMExtraArgsFromBytes( + bytes calldata extraArgs, + uint64 defaultTxGasLimit + ) private pure returns (Client.EVMExtraArgsV2 memory) { + if (extraArgs.length == 0) { + // If extra args are empty, generate default values + return Client.EVMExtraArgsV2({gasLimit: defaultTxGasLimit, allowOutOfOrderExecution: false}); + } + + bytes4 extraArgsTag = bytes4(extraArgs); + bytes memory argsData = extraArgs[4:]; + + if (extraArgsTag == Client.EVM_EXTRA_ARGS_V2_TAG) { + return abi.decode(argsData, (Client.EVMExtraArgsV2)); + } else if (extraArgsTag == Client.EVM_EXTRA_ARGS_V1_TAG) { + // EVMExtraArgsV1 originally included a second boolean (strict) field which has been deprecated. + // Clients may still include it but it will be ignored. + return Client.EVMExtraArgsV2({gasLimit: abi.decode(argsData, (uint256)), allowOutOfOrderExecution: false}); + } + + revert InvalidExtraArgsTag(); + } + + /// @notice Validate the forwarded message to ensure it matches the configuration limits (message length, number of tokens) + /// and family-specific expectations (address format) + /// @param destChainDynamicConfig Dest chain config + /// @param dataLength The length of the data field of the message. + /// @param numberOfTokens The number of tokens to be sent. + /// @param receiver Message receiver on the dest chain + function _validateMessage( + DestChainDynamicConfig memory destChainDynamicConfig, + uint256 dataLength, + uint256 numberOfTokens, + bytes memory receiver + ) internal pure { + // Check that payload is formed correctly + if (dataLength > uint256(destChainDynamicConfig.maxDataBytes)) { + revert MessageTooLarge(uint256(destChainDynamicConfig.maxDataBytes), dataLength); + } + if (numberOfTokens > uint256(destChainDynamicConfig.maxNumberOfTokensPerMsg)) revert UnsupportedNumberOfTokens(); + _validateDestFamilyAddress(destChainDynamicConfig.chainFamilySelector, receiver); + } + + /// @inheritdoc IPriceRegistry + /// @dev precondition - message.tokenAmounts and sourceTokenAmounts lengths must be equal + function getValidatedRampMessageParams( + Internal.EVM2AnyRampMessage calldata message, + Client.EVMTokenAmount[] calldata sourceTokenAmounts + ) external view returns (uint256 msgFeeJuels, bool isOutOfOrderExecution, bytes memory convertedExtraArgs) { + uint64 destChainSelector = message.header.destChainSelector; + DestChainDynamicConfig storage destChainDynamicConfig = s_destChainDynamicConfigs[destChainSelector]; + + for (uint256 i = 0; i < message.tokenAmounts.length; ++i) { + address sourceToken = sourceTokenAmounts[i].token; + + // Since the DON has to pay for the extraData to be included on the destination chain, we cap the length of the + // extraData. This prevents gas bomb attacks on the NOPs. As destBytesOverhead accounts for both + // extraData and offchainData, this caps the worst case abuse to the number of bytes reserved for offchainData. + uint256 destPoolDataLength = message.tokenAmounts[i].extraData.length; + if ( + destPoolDataLength > Pool.CCIP_LOCK_OR_BURN_V1_RET_BYTES + && destPoolDataLength > s_tokenTransferFeeConfig[destChainSelector][sourceToken].destBytesOverhead + ) { + revert SourceTokenDataTooLarge(sourceToken); + } + + _validateDestFamilyAddress(destChainDynamicConfig.chainFamilySelector, message.tokenAmounts[i].destTokenAddress); + } + + // Convert feeToken to link if not already in link + if (message.feeToken == i_linkToken) { + msgFeeJuels = message.feeTokenAmount; + } else { + msgFeeJuels = convertTokenAmount(message.feeToken, message.feeTokenAmount, i_linkToken); + } + + if (msgFeeJuels > i_maxFeeJuelsPerMsg) revert MessageFeeTooHigh(msgFeeJuels, i_maxFeeJuelsPerMsg); + + // NOTE: when supporting non-EVM chains, revisit this and parse non-EVM args. + // We can parse unvalidated args since getValidatedRampMessageParams is called after getFee (which will already validate the params) + Client.EVMExtraArgsV2 memory extraArgs = + _parseUnvalidatedEVMExtraArgsFromBytes(message.extraArgs, destChainDynamicConfig.defaultTxGasLimit); + isOutOfOrderExecution = extraArgs.allowOutOfOrderExecution; + + return (msgFeeJuels, isOutOfOrderExecution, abi.encode(extraArgs)); + } + + /// @notice Returns the configured dynamic config for the dest chain selector + /// @param destChainSelector destination chain selector to fetch config for + /// @return destChainDynamicConfig Dynamic config for the dest chain + function getDestChainDynamicConfig(uint64 destChainSelector) external view returns (DestChainDynamicConfig memory) { + return s_destChainDynamicConfigs[destChainSelector]; + } + + /// @notice Updates the destination chain specific config. + /// @param destChainConfigArgs Array of source chain specific configs. + function applyDestChainConfigUpdates(DestChainDynamicConfigArgs[] memory destChainConfigArgs) external onlyOwner { + _applyDestChainConfigUpdates(destChainConfigArgs); + } + + /// @notice Internal version of applyDestChainConfigUpdates. + function _applyDestChainConfigUpdates(DestChainDynamicConfigArgs[] memory destChainConfigArgs) internal { + for (uint256 i = 0; i < destChainConfigArgs.length; ++i) { + DestChainDynamicConfigArgs memory destChainConfigArg = destChainConfigArgs[i]; + uint64 destChainSelector = destChainConfigArgs[i].destChainSelector; + DestChainDynamicConfig memory destChainDynamicConfigArg = destChainConfigArg.dynamicConfig; + + // NOTE: when supporting non-EVM chains, update chainFamilySelector validations + if ( + destChainSelector == 0 || destChainDynamicConfigArg.defaultTxGasLimit == 0 + || destChainDynamicConfigArg.chainFamilySelector != Internal.CHAIN_FAMILY_SELECTOR_EVM + || destChainDynamicConfigArg.defaultTokenDestBytesOverhead < Pool.CCIP_LOCK_OR_BURN_V1_RET_BYTES + ) { + revert InvalidDestChainConfig(destChainSelector); + } + + // The chain family selector cannot be zero - indicates that it is a new chain + if (s_destChainDynamicConfigs[destChainSelector].chainFamilySelector == 0) { + emit DestChainAdded(destChainSelector, destChainDynamicConfigArg); + } else { + emit DestChainDynamicConfigUpdated(destChainSelector, destChainDynamicConfigArg); + } + + s_destChainDynamicConfigs[destChainSelector] = destChainDynamicConfigArg; + } + } + + /// @notice Returns the static PriceRegistry config. + /// @dev RMN depends on this function, if changing, please notify the RMN maintainers. + /// @return the configuration. + function getStaticConfig() external view returns (StaticConfig memory) { + return StaticConfig({ + maxFeeJuelsPerMsg: i_maxFeeJuelsPerMsg, + linkToken: i_linkToken, + stalenessThreshold: i_stalenessThreshold + }); + } + // ================================================================ // │ Access │ // ================================================================ diff --git a/contracts/src/v0.8/ccip/interfaces/IPriceRegistry.sol b/contracts/src/v0.8/ccip/interfaces/IPriceRegistry.sol index f3c9bb0115..8763831680 100644 --- a/contracts/src/v0.8/ccip/interfaces/IPriceRegistry.sol +++ b/contracts/src/v0.8/ccip/interfaces/IPriceRegistry.sol @@ -1,6 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; +import {Client} from "../libraries/Client.sol"; import {Internal} from "../libraries/Internal.sol"; interface IPriceRegistry { @@ -71,4 +72,24 @@ interface IPriceRegistry { /// @notice Get the list of fee tokens. /// @return The tokens set as fee tokens. function getFeeTokens() external view returns (address[] memory); + + /// @notice Validates the ccip message & returns the fee + /// @param destChainSelector The destination chain selector. + /// @param message The message to get quote for. + /// @return feeTokenAmount The amount of fee token needed for the fee, in smallest denomination of the fee token. + function getValidatedFee( + uint64 destChainSelector, + Client.EVM2AnyMessage calldata message + ) external view returns (uint256 feeTokenAmount); + + /// @notice Validates the message that is emitted from an OnRamp, and returns the converted message fee in juels + /// @param message OnRamp message to validate + /// @param sourceTokenAmounts Source token amounts that match the message tokenAmounts + /// @return msgFeeJuels message fee in juels + /// @return isOutOfOrderExecution true if the message should be executed out of order + /// @return convertedExtraArgs extra args converted to the latest family-specific args version + function getValidatedRampMessageParams( + Internal.EVM2AnyRampMessage memory message, + Client.EVMTokenAmount[] memory sourceTokenAmounts + ) external view returns (uint256 msgFeeJuels, bool isOutOfOrderExecution, bytes memory convertedExtraArgs); } diff --git a/contracts/src/v0.8/ccip/onRamp/EVM2EVMMultiOnRamp.sol b/contracts/src/v0.8/ccip/onRamp/EVM2EVMMultiOnRamp.sol index d3e560b5fe..d3e734f78a 100644 --- a/contracts/src/v0.8/ccip/onRamp/EVM2EVMMultiOnRamp.sol +++ b/contracts/src/v0.8/ccip/onRamp/EVM2EVMMultiOnRamp.sol @@ -30,43 +30,26 @@ contract EVM2EVMMultiOnRamp is IEVM2AnyOnRampClient, ITypeAndVersion, OwnerIsCre error InvalidExtraArgsTag(); error ExtraArgOutOfOrderExecutionMustBeTrue(); error OnlyCallableByOwnerOrAdmin(); - error MessageTooLarge(uint256 maxSize, uint256 actualSize); error MessageGasLimitTooHigh(); - error MessageFeeTooHigh(uint256 msgFeeJuels, uint256 maxFeeJuelsPerMsg); - error UnsupportedNumberOfTokens(); error UnsupportedToken(address token); error MustBeCalledByRouter(); error RouterMustSetOriginalSender(); error InvalidConfig(); error CursedByRMN(uint64 sourceChainSelector); - error NotAFeeToken(address token); - error SourceTokenDataTooLarge(address token); error GetSupportedTokensFunctionalityRemovedCheckAdminRegistry(); - error InvalidDestChainConfig(uint64 destChainSelector); - error DestinationChainNotEnabled(uint64 destChainSelector); - error InvalidDestBytesOverhead(address token, uint32 destBytesOverhead); event AdminSet(address newAdmin); event ConfigSet(StaticConfig staticConfig, DynamicConfig dynamicConfig); event FeePaid(address indexed feeToken, uint256 feeValueJuels); event FeeTokenWithdrawn(address indexed feeAggregator, address indexed feeToken, uint256 amount); - event PremiumMultiplierWeiPerEthUpdated(address indexed token, uint64 premiumMultiplierWeiPerEth); - event TokenTransferFeeConfigUpdated( - uint64 indexed destChainSelector, address indexed token, TokenTransferFeeConfig tokenTransferFeeConfig - ); - event TokenTransferFeeConfigDeleted(uint64 indexed destChainSelector, address indexed token); /// RMN depends on this event, if changing, please notify the RMN maintainers. event CCIPSendRequested(uint64 indexed destChainSelector, Internal.EVM2AnyRampMessage message); - event DestChainAdded(uint64 indexed destChainSelector, DestChainConfig destChainConfig); - event DestChainDynamicConfigUpdated(uint64 indexed destChainSelector, DestChainDynamicConfig dynamicConfig); /// @dev Struct that contains the static configuration /// RMN depends on this struct, if changing, please notify the RMN maintainers. // solhint-disable-next-line gas-struct-packing struct StaticConfig { - address linkToken; // ────────╮ Link token address - uint64 chainSelector; // ─────╯ Source chainSelector - uint96 maxFeeJuelsPerMsg; // ─╮ Maximum fee that can be charged for a message + uint64 chainSelector; // ─────╮ Source chainSelector address rmnProxy; // ─────────╯ Address of RMN proxy address nonceManager; // Address of the nonce manager address tokenAdminRegistry; // Token admin registry address @@ -81,95 +64,8 @@ contract EVM2EVMMultiOnRamp is IEVM2AnyOnRampClient, ITypeAndVersion, OwnerIsCre address feeAggregator; // Fee aggregator address } - /// @dev Struct to hold the fee token configuration for a token, same as the s_premiumMultiplierWeiPerEth but with - /// the token address included so that an array of these can be passed in the constructor and - /// applyPremiumMultiplierWeiPerEthUpdates to set the mapping - struct PremiumMultiplierWeiPerEthArgs { - address token; // // ───────────────────╮ Token address - uint64 premiumMultiplierWeiPerEth; // ──╯ Multiplier for destination chain specific premiums. Should never be 0 so can be used as an isEnabled flag - } - - /// @dev Struct to hold the transfer fee configuration for token transfers - struct TokenTransferFeeConfig { - uint32 minFeeUSDCents; // ──────────╮ Minimum fee to charge per token transfer, multiples of 0.01 USD - uint32 maxFeeUSDCents; // │ Maximum fee to charge per token transfer, multiples of 0.01 USD - uint16 deciBps; // │ Basis points charged on token transfers, multiples of 0.1bps, or 1e-5 - uint32 destGasOverhead; // │ Gas charged to execute the token transfer on the destination chain - // │ Extra data availability bytes that are returned from the source pool and sent - uint32 destBytesOverhead; // │ to the destination pool. Must be >= Pool.CCIP_LOCK_OR_BURN_V1_RET_BYTES - bool isEnabled; // ─────────────────╯ Whether this token has custom transfer fees - } - - /// @dev Struct to hold the token transfer fee configurations for a token, same as TokenTransferFeeConfig but with the token address included so - /// that an array of these can be passed in the TokenTransferFeeConfigArgs struct to set the mapping - struct TokenTransferFeeConfigSingleTokenArgs { - address token; // Token address - TokenTransferFeeConfig tokenTransferFeeConfig; // struct to hold the transfer fee configuration for token transfers - } - - /// @dev Struct to hold the token transfer fee configurations for a destination chain and a set of tokens. Same as TokenTransferFeeConfigSingleTokenArgs - /// but with the destChainSelector and an array of TokenTransferFeeConfigSingleTokenArgs included so that an array of these can be passed in the constructor - /// and the applyTokenTransferFeeConfigUpdates function - struct TokenTransferFeeConfigArgs { - uint64 destChainSelector; // Destination chain selector - TokenTransferFeeConfigSingleTokenArgs[] tokenTransferFeeConfigs; // Array of token transfer fee configurations - } - - /// @dev Struct to hold a pair of destination chain selector and token address so that an array of these can be passed in the - /// applyTokenTransferFeeConfigUpdates function to remove the token transfer fee configuration for a token - struct TokenTransferFeeConfigRemoveArgs { - uint64 destChainSelector; // ─╮ Destination chain selector - address token; // ────────────╯ Token address - } - - /// @dev Struct to hold the dynamic configs for a destination chain - struct DestChainDynamicConfig { - bool isEnabled; // ──────────────────────────╮ Whether this destination chain is enabled - uint16 maxNumberOfTokensPerMsg; // │ Maximum number of distinct ERC20 token transferred per message - uint32 maxDataBytes; // │ Maximum payload data size in bytes - uint32 maxPerMsgGasLimit; // │ Maximum gas limit for messages targeting EVMs - uint32 destGasOverhead; // │ Gas charged on top of the gasLimit to cover destination chain costs - uint16 destGasPerPayloadByte; // │ Destination chain gas charged for passing each byte of `data` payload to receiver - uint32 destDataAvailabilityOverheadGas; // | Extra data availability gas charged on top of the message, e.g. for OCR - uint16 destGasPerDataAvailabilityByte; // | Amount of gas to charge per byte of message data that needs availability - uint16 destDataAvailabilityMultiplierBps; // │ Multiplier for data availability gas, multiples of bps, or 0.0001 - // The following three properties are defaults, they can be overridden by setting the TokenTransferFeeConfig for a token - uint16 defaultTokenFeeUSDCents; // │ Default token fee charged per token transfer - uint32 defaultTokenDestGasOverhead; // ──────╯ Default gas charged to execute the token transfer on the destination chain - uint32 defaultTokenDestBytesOverhead; // ────╮ Default extra data availability bytes charged per token transfer - uint64 defaultTxGasLimit; // │ Default gas limit for a tx - uint64 gasMultiplierWeiPerEth; // │ Multiplier for gas costs, 1e18 based so 11e17 = 10% extra cost. - uint32 networkFeeUSDCents; // │ Flat network fee to charge for messages, multiples of 0.01 USD - bool enforceOutOfOrder; // │ Whether to enforce the allowOutOfOrderExecution extraArg value to be true. - bytes4 chainFamilySelector; // ──────────────╯ Selector that identifies the destination chain's family. Used to determine the correct validations to perform for the dest chain. - } - - /// @dev Struct to hold the configs for a destination chain - struct DestChainConfig { - DestChainDynamicConfig dynamicConfig; // Dynamic configs for a destination chain - uint64 sequenceNumber; // The last used sequence number. This is zero in the case where no messages has been sent yet. - // 0 is not a valid sequence number for any real transaction. - /// @dev metadataHash is a lane-specific prefix for a message hash preimage which ensures global uniqueness - /// Ensures that 2 identical messages sent to 2 different lanes will have a distinct hash. - /// Must match the metadataHash used in computing leaf hashes offchain for the root committed in - /// the commitStore and i_metadataHash in the offRamp. - bytes32 metadataHash; - } - - /// @dev Struct to hold the dynamic configs, its destination chain selector. Same as DestChainConfig but with the destChainSelector so that an array of these - /// can be passed in the constructor and the applyDestChainConfigUpdates function - //solhint-disable gas-struct-packing - struct DestChainConfigArgs { - uint64 destChainSelector; // Destination chain selector - DestChainDynamicConfig dynamicConfig; // Struct to hold the configs for a destination chain - } - // STATIC CONFIG string public constant override typeAndVersion = "EVM2EVMMultiOnRamp 1.6.0-dev"; - /// @dev Maximum fee that can be charged for a message. This is a guard to prevent massively overcharging due to misconfiguation. - uint96 internal immutable i_maxFeeJuelsPerMsg; - /// @dev The link token address - address internal immutable i_linkToken; /// @dev The chain ID of the source chain that this contract is deployed to uint64 internal immutable i_chainSelector; /// @dev The address of the rmn proxy @@ -186,14 +82,10 @@ contract EVM2EVMMultiOnRamp is IEVM2AnyOnRampClient, ITypeAndVersion, OwnerIsCre /// @dev The config for the onRamp DynamicConfig internal s_dynamicConfig; - /// @dev The destination chain specific configs - mapping(uint64 destChainSelector => DestChainConfig destChainConfig) internal s_destChainConfig; - /// @dev The multiplier for destination chain specific premiums that can be set by the owner or fee admin - /// This should never be 0 once set, so it can be used as an isEnabled flag - mapping(address token => uint64 premiumMultiplierWeiPerEth) internal s_premiumMultiplierWeiPerEth; - /// @dev The token transfer fee config that can be set by the owner or fee admin - mapping(uint64 destChainSelector => mapping(address token => TokenTransferFeeConfig tranferFeeConfig)) internal - s_tokenTransferFeeConfig; + /// @dev Last used sequence number per destination chain. + /// This is zero in the case where no messages have been sent yet. + /// 0 is not a valid sequence number for any real transaction. + mapping(uint64 destChainSelector => uint64 sequenceNumber) internal s_destChainSequenceNumbers; // STATE /// @dev The amount of LINK available to pay NOPS @@ -201,31 +93,20 @@ contract EVM2EVMMultiOnRamp is IEVM2AnyOnRampClient, ITypeAndVersion, OwnerIsCre /// @dev The combined weight of all NOPs weights uint32 internal s_nopWeightsTotal; - constructor( - StaticConfig memory staticConfig, - DynamicConfig memory dynamicConfig, - DestChainConfigArgs[] memory destChainConfigArgs, - PremiumMultiplierWeiPerEthArgs[] memory premiumMultiplierWeiPerEthArgs, - TokenTransferFeeConfigArgs[] memory tokenTransferFeeConfigArgs - ) { + constructor(StaticConfig memory staticConfig, DynamicConfig memory dynamicConfig) { if ( - staticConfig.linkToken == address(0) || staticConfig.chainSelector == 0 || staticConfig.rmnProxy == address(0) - || staticConfig.nonceManager == address(0) || staticConfig.tokenAdminRegistry == address(0) + staticConfig.chainSelector == 0 || staticConfig.rmnProxy == address(0) || staticConfig.nonceManager == address(0) + || staticConfig.tokenAdminRegistry == address(0) ) { revert InvalidConfig(); } - i_linkToken = staticConfig.linkToken; i_chainSelector = staticConfig.chainSelector; - i_maxFeeJuelsPerMsg = staticConfig.maxFeeJuelsPerMsg; i_rmnProxy = staticConfig.rmnProxy; i_nonceManager = staticConfig.nonceManager; i_tokenAdminRegistry = staticConfig.tokenAdminRegistry; _setDynamicConfig(dynamicConfig); - _applyDestChainConfigUpdates(destChainConfigArgs); - _applyPremiumMultiplierWeiPerEthUpdates(premiumMultiplierWeiPerEthArgs); - _applyTokenTransferFeeConfigUpdates(tokenTransferFeeConfigArgs, new TokenTransferFeeConfigRemoveArgs[](0)); } // ================================================================ @@ -236,7 +117,7 @@ contract EVM2EVMMultiOnRamp is IEVM2AnyOnRampClient, ITypeAndVersion, OwnerIsCre /// @param destChainSelector The destination chain selector /// @return the next sequence number to be used function getExpectedNextSequenceNumber(uint64 destChainSelector) external view returns (uint64) { - return s_destChainConfig[destChainSelector].sequenceNumber + 1; + return s_destChainSequenceNumbers[destChainSelector] + 1; } /// @inheritdoc IEVM2AnyOnRampClient @@ -246,58 +127,9 @@ contract EVM2EVMMultiOnRamp is IEVM2AnyOnRampClient, ITypeAndVersion, OwnerIsCre uint256 feeTokenAmount, address originalSender ) external returns (bytes32) { - DestChainConfig storage destChainConfig = s_destChainConfig[destChainSelector]; + // TODO: inline generateNewMessage Internal.EVM2AnyRampMessage memory newMessage = - _generateNewMessage(destChainConfig, destChainSelector, message, feeTokenAmount, originalSender); - - // Lock the tokens as last step. TokenPools may not always be trusted. - // There should be no state changes after external call to TokenPools. - for (uint256 i = 0; i < newMessage.tokenAmounts.length; ++i) { - Client.EVMTokenAmount memory tokenAndAmount = message.tokenAmounts[i]; - - if (tokenAndAmount.amount == 0) revert CannotSendZeroTokens(); - - IPoolV1 sourcePool = getPoolBySourceToken(destChainSelector, IERC20(tokenAndAmount.token)); - // We don't have to check if it supports the pool version in a non-reverting way here because - // if we revert here, there is no effect on CCIP. Therefore we directly call the supportsInterface - // function and not through the ERC165Checker. - if (address(sourcePool) == address(0) || !sourcePool.supportsInterface(Pool.CCIP_POOL_V1)) { - revert UnsupportedToken(tokenAndAmount.token); - } - - Pool.LockOrBurnOutV1 memory poolReturnData = sourcePool.lockOrBurn( - Pool.LockOrBurnInV1({ - receiver: message.receiver, - remoteChainSelector: destChainSelector, - originalSender: originalSender, - amount: tokenAndAmount.amount, - localToken: tokenAndAmount.token - }) - ); - - // Since the DON has to pay for the extraData to be included on the destination chain, we cap the length of the - // extraData. This prevents gas bomb attacks on the NOPs. As destBytesOverhead accounts for both - // extraData and offchainData, this caps the worst case abuse to the number of bytes reserved for offchainData. - if ( - poolReturnData.destPoolData.length > Pool.CCIP_LOCK_OR_BURN_V1_RET_BYTES - && poolReturnData.destPoolData.length - > s_tokenTransferFeeConfig[destChainSelector][tokenAndAmount.token].destBytesOverhead - ) { - revert SourceTokenDataTooLarge(tokenAndAmount.token); - } - - _validateDestFamilyAddress(destChainConfig.dynamicConfig.chainFamilySelector, poolReturnData.destTokenAddress); - - newMessage.tokenAmounts[i] = Internal.RampTokenAmount({ - sourcePoolAddress: abi.encode(sourcePool), - destTokenAddress: poolReturnData.destTokenAddress, - extraData: poolReturnData.destPoolData, - amount: tokenAndAmount.amount - }); - } - - // Hash only after the sourceTokenData has been set - newMessage.header.messageId = Internal._hash(newMessage, destChainConfig.metadataHash); + _generateNewMessage(destChainSelector, message, feeTokenAmount, originalSender); // Emit message request // This must happen after any pool events as some tokens (e.g. USDC) emit events that we expect to precede this @@ -307,62 +139,32 @@ contract EVM2EVMMultiOnRamp is IEVM2AnyOnRampClient, ITypeAndVersion, OwnerIsCre } /// @notice Helper function to relieve stack pressure from `forwardFromRouter` - /// @param destChainConfig The destination chain config storage pointer /// @param destChainSelector The destination chain selector /// @param message Message struct to send /// @param feeTokenAmount Amount of fee tokens for payment /// @param originalSender The original initiator of the CCIP request function _generateNewMessage( - DestChainConfig storage destChainConfig, uint64 destChainSelector, Client.EVM2AnyMessage calldata message, uint256 feeTokenAmount, address originalSender ) internal returns (Internal.EVM2AnyRampMessage memory) { - if (IRMN(i_rmnProxy).isCursed(bytes16(uint128(destChainSelector)))) revert CursedByRMN(destChainSelector); + // NOTE: assumes the message has already been validated through the getFee call // Validate message sender is set and allowed. Not validated in `getFee` since it is not user-driven. if (originalSender == address(0)) revert RouterMustSetOriginalSender(); // Router address may be zero intentionally to pause. if (msg.sender != s_dynamicConfig.router) revert MustBeCalledByRouter(); - if (!destChainConfig.dynamicConfig.isEnabled) revert DestinationChainNotEnabled(destChainSelector); - // Validate the message with various checks - uint256 numberOfTokens = message.tokenAmounts.length; - // TODO: optimization - consider removing this call, since the Router calls into getFee -> _validateMessage - _validateMessage(destChainSelector, message.data.length, numberOfTokens, message.receiver); - - // Only check token value if there are tokens - if (numberOfTokens > 0) { - address messageValidator = s_dynamicConfig.messageValidator; - if (messageValidator != address(0)) { - try IMessageInterceptor(messageValidator).onOutboundMessage(destChainSelector, message) {} - catch (bytes memory err) { - revert IMessageInterceptor.MessageValidationError(err); - } + address messageValidator = s_dynamicConfig.messageValidator; + if (messageValidator != address(0)) { + try IMessageInterceptor(messageValidator).onOutboundMessage(destChainSelector, message) {} + catch (bytes memory err) { + revert IMessageInterceptor.MessageValidationError(err); } } - uint256 msgFeeJuels; - // Convert feeToken to link if not already in link - if (message.feeToken == i_linkToken) { - msgFeeJuels = feeTokenAmount; - } else { - msgFeeJuels = - IPriceRegistry(s_dynamicConfig.priceRegistry).convertTokenAmount(message.feeToken, feeTokenAmount, i_linkToken); - } - - emit FeePaid(message.feeToken, msgFeeJuels); - - if (msgFeeJuels > i_maxFeeJuelsPerMsg) revert MessageFeeTooHigh(msgFeeJuels, i_maxFeeJuelsPerMsg); - - // NOTE: when supporting non-EVM chains, revisit this and parse non-EVM args - // Assumes strict ordering, unless the chain is of the EVM family and the extra args indicate out of order execution - uint64 nonce = 0; - if (!_parseEVMExtraArgsFromBytes(message.extraArgs, destChainConfig.dynamicConfig).allowOutOfOrderExecution) { - // Only bump nonce for messages that specify allowOutOfOrderExecution == false. Otherwise, we - // may block ordered message nonces, which is not what we want. - nonce = INonceManager(i_nonceManager).getIncrementedOutboundNonce(destChainSelector, originalSender); - } + // Validate the message with various checks + uint256 numberOfTokens = message.tokenAmounts.length; Internal.EVM2AnyRampMessage memory rampMessage = Internal.EVM2AnyRampMessage({ header: Internal.RampMessageHeader({ @@ -371,114 +173,90 @@ contract EVM2EVMMultiOnRamp is IEVM2AnyOnRampClient, ITypeAndVersion, OwnerIsCre sourceChainSelector: i_chainSelector, destChainSelector: destChainSelector, // We need the next available sequence number so we increment before we use the value - sequenceNumber: ++destChainConfig.sequenceNumber, - nonce: nonce + sequenceNumber: ++s_destChainSequenceNumbers[destChainSelector], + nonce: 0 }), sender: originalSender, data: message.data, - extraArgs: _convertParsedExtraArgs(message.extraArgs, destChainConfig.dynamicConfig), + extraArgs: message.extraArgs, receiver: message.receiver, feeToken: message.feeToken, feeTokenAmount: feeTokenAmount, tokenAmounts: new Internal.RampTokenAmount[](numberOfTokens) // should be populated after generation }); - return rampMessage; - } - - /// @dev Parses extraArgs with dest chain config family tag validation, and re-encodes the args to the latest arguments version. - /// Used to generate an EVM2AnyRampMessage with the accurate representation of the parsed extraArgs. - /// @param extraArgs The extra args bytes - /// @param destChainDynamicConfig Dest chain config to validate against - /// @return encodedExtraArgs the parsed & encoded extra args - function _convertParsedExtraArgs( - bytes calldata extraArgs, - DestChainDynamicConfig memory destChainDynamicConfig - ) internal pure returns (bytes memory encodedExtraArgs) { - bytes4 chainFamilySelector = destChainDynamicConfig.chainFamilySelector; - if (chainFamilySelector == Internal.CHAIN_FAMILY_SELECTOR_EVM) { - return abi.encode(_parseEVMExtraArgsFromBytes(extraArgs, destChainDynamicConfig)); - } - // Invalid chain family selectors cannot be configured - ignore invalid cases - return encodedExtraArgs; - } - - /// @dev Convert the extra args bytes into a struct with validations against the dest chain config - /// @param extraArgs The extra args bytes - /// @param destChainDynamicConfig Dest chain config to validate against - /// @return EVMExtraArgs the extra args struct (latest version) - function _parseEVMExtraArgsFromBytes( - bytes calldata extraArgs, - DestChainDynamicConfig memory destChainDynamicConfig - ) internal pure returns (Client.EVMExtraArgsV2 memory) { - Client.EVMExtraArgsV2 memory evmExtraArgs = - _parseUnvalidatedEVMExtraArgsFromBytes(extraArgs, destChainDynamicConfig.defaultTxGasLimit); - - if (evmExtraArgs.gasLimit > uint256(destChainDynamicConfig.maxPerMsgGasLimit)) revert MessageGasLimitTooHigh(); - if (destChainDynamicConfig.enforceOutOfOrder && !evmExtraArgs.allowOutOfOrderExecution) { - revert ExtraArgOutOfOrderExecutionMustBeTrue(); + // Lock the tokens as last step. TokenPools may not always be trusted. + // There should be no state changes after external call to TokenPools. + for (uint256 i = 0; i < numberOfTokens; ++i) { + rampMessage.tokenAmounts[i] = + _lockOrBurnSingleToken(message.tokenAmounts[i], destChainSelector, message.receiver, originalSender); } - return evmExtraArgs; - } + (uint256 msgFeeJuels, bool isOutOfOrderExecution, bytes memory convertedExtraArgs) = + IPriceRegistry(s_dynamicConfig.priceRegistry).getValidatedRampMessageParams(rampMessage, message.tokenAmounts); + emit FeePaid(message.feeToken, msgFeeJuels); - /// @dev Convert the extra args bytes into a struct - /// @param extraArgs The extra args bytes - /// @param defaultTxGasLimit default tx gas limit to use in the absence of extra args - /// @return EVMExtraArgs the extra args struct (latest version) - function _parseUnvalidatedEVMExtraArgsFromBytes( - bytes calldata extraArgs, - uint64 defaultTxGasLimit - ) private pure returns (Client.EVMExtraArgsV2 memory) { - if (extraArgs.length == 0) { - // If extra args are empty, generate default values - return Client.EVMExtraArgsV2({gasLimit: defaultTxGasLimit, allowOutOfOrderExecution: false}); + if (!isOutOfOrderExecution) { + // Only bump nonce for messages that specify allowOutOfOrderExecution == false. Otherwise, we + // may block ordered message nonces, which is not what we want. + rampMessage.header.nonce = + INonceManager(i_nonceManager).getIncrementedOutboundNonce(destChainSelector, originalSender); } - bytes4 extraArgsTag = bytes4(extraArgs); - bytes memory argsData = extraArgs[4:]; + // Override extraArgs with latest version + rampMessage.extraArgs = convertedExtraArgs; - if (extraArgsTag == Client.EVM_EXTRA_ARGS_V2_TAG) { - return abi.decode(argsData, (Client.EVMExtraArgsV2)); - } else if (extraArgsTag == Client.EVM_EXTRA_ARGS_V1_TAG) { - // EVMExtraArgsV1 originally included a second boolean (strict) field which has been deprecated. - // Clients may still include it but it will be ignored. - return Client.EVMExtraArgsV2({gasLimit: abi.decode(argsData, (uint256)), allowOutOfOrderExecution: false}); - } + // Hash only after all fields have been set + rampMessage.header.messageId = Internal._hash( + rampMessage, + // Metadata hash preimage to ensure global uniqueness, ensuring 2 identical messages sent to 2 different + // lanes will have a distinct hash. + keccak256(abi.encode(Internal.EVM_2_ANY_MESSAGE_HASH, i_chainSelector, destChainSelector, address(this))) + ); - revert InvalidExtraArgsTag(); + return rampMessage; } - /// @notice Validate the forwarded message with various checks. - /// @dev This function can be called multiple times during a CCIPSend, - /// only common user-driven mistakes are validated here to minimize duplicate validation cost. - /// @param destChainSelector The destination chain selector. - /// @param dataLength The length of the data field of the message. - /// @param numberOfTokens The number of tokens to be sent. - function _validateMessage( + /// @notice Uses a pool to lock or burn a token + /// @param tokenAndAmount Token address and amount to lock or burn + /// @param destChainSelector Target dest chain selector of the message + /// @param receiver Message receiver + /// @param originalSender Message sender + /// @return rampTokenAndAmount Ramp token and amount data + function _lockOrBurnSingleToken( + Client.EVMTokenAmount memory tokenAndAmount, uint64 destChainSelector, - uint256 dataLength, - uint256 numberOfTokens, - bytes calldata receiver - ) internal view { - // Check that payload is formed correctly - DestChainDynamicConfig storage destChainDynamicConfig = s_destChainConfig[destChainSelector].dynamicConfig; - if (dataLength > uint256(destChainDynamicConfig.maxDataBytes)) { - revert MessageTooLarge(uint256(destChainDynamicConfig.maxDataBytes), dataLength); + bytes memory receiver, + address originalSender + ) internal returns (Internal.RampTokenAmount memory) { + if (tokenAndAmount.amount == 0) revert CannotSendZeroTokens(); + + IPoolV1 sourcePool = getPoolBySourceToken(destChainSelector, IERC20(tokenAndAmount.token)); + // We don't have to check if it supports the pool version in a non-reverting way here because + // if we revert here, there is no effect on CCIP. Therefore we directly call the supportsInterface + // function and not through the ERC165Checker. + if (address(sourcePool) == address(0) || !sourcePool.supportsInterface(Pool.CCIP_POOL_V1)) { + revert UnsupportedToken(tokenAndAmount.token); } - if (numberOfTokens > uint256(destChainDynamicConfig.maxNumberOfTokensPerMsg)) revert UnsupportedNumberOfTokens(); - _validateDestFamilyAddress(destChainDynamicConfig.chainFamilySelector, receiver); - } + Pool.LockOrBurnOutV1 memory poolReturnData = sourcePool.lockOrBurn( + Pool.LockOrBurnInV1({ + receiver: receiver, + remoteChainSelector: destChainSelector, + originalSender: originalSender, + amount: tokenAndAmount.amount, + localToken: tokenAndAmount.token + }) + ); - /// @notice Validates that the destAddress matches the expected format of the family. - /// @param chainFamilySelector Tag to identify the target family - /// @param destAddress Dest address to validate - /// @dev precondition - assumes the family tag is correct and validated - function _validateDestFamilyAddress(bytes4 chainFamilySelector, bytes memory destAddress) internal pure { - if (chainFamilySelector == Internal.CHAIN_FAMILY_SELECTOR_EVM) { - Internal._validateEVMAddress(destAddress); - } + // NOTE: pool data validations are outsourced to the PriceRegistry to handle family-specific logic handling + + return Internal.RampTokenAmount({ + sourcePoolAddress: abi.encode(sourcePool), + destTokenAddress: poolReturnData.destTokenAddress, + extraData: poolReturnData.destPoolData, + amount: tokenAndAmount.amount + }); } // ================================================================ @@ -490,9 +268,7 @@ contract EVM2EVMMultiOnRamp is IEVM2AnyOnRampClient, ITypeAndVersion, OwnerIsCre /// @return the configuration. function getStaticConfig() external view returns (StaticConfig memory) { return StaticConfig({ - linkToken: i_linkToken, chainSelector: i_chainSelector, - maxFeeJuelsPerMsg: i_maxFeeJuelsPerMsg, rmnProxy: i_rmnProxy, nonceManager: i_nonceManager, tokenAdminRegistry: i_tokenAdminRegistry @@ -520,9 +296,7 @@ contract EVM2EVMMultiOnRamp is IEVM2AnyOnRampClient, ITypeAndVersion, OwnerIsCre emit ConfigSet( StaticConfig({ - linkToken: i_linkToken, chainSelector: i_chainSelector, - maxFeeJuelsPerMsg: i_maxFeeJuelsPerMsg, rmnProxy: i_rmnProxy, nonceManager: i_nonceManager, tokenAdminRegistry: i_tokenAdminRegistry @@ -558,317 +332,9 @@ contract EVM2EVMMultiOnRamp is IEVM2AnyOnRampClient, ITypeAndVersion, OwnerIsCre uint64 destChainSelector, Client.EVM2AnyMessage calldata message ) external view returns (uint256 feeTokenAmount) { - DestChainDynamicConfig storage destChainDynamicConfig = s_destChainConfig[destChainSelector].dynamicConfig; - - if (!destChainDynamicConfig.isEnabled) revert DestinationChainNotEnabled(destChainSelector); - - // Validate the message with various checks - _validateMessage(destChainSelector, message.data.length, message.tokenAmounts.length, message.receiver); - - uint64 premiumMultiplierWeiPerEth = s_premiumMultiplierWeiPerEth[message.feeToken]; - - // premiumMultiplierWeiPerEth should never be 0 so it can be used as an isEnabled flag - if (premiumMultiplierWeiPerEth == 0) revert NotAFeeToken(message.feeToken); - - (uint224 feeTokenPrice, uint224 packedGasPrice) = - IPriceRegistry(s_dynamicConfig.priceRegistry).getTokenAndGasPrices(message.feeToken, destChainSelector); - - // Calculate premiumFee in USD with 18 decimals precision first. - // If message-only and no token transfers, a flat network fee is charged. - // If there are token transfers, premiumFee is calculated from token transfer fee. - // If there are both token transfers and message, premiumFee is only calculated from token transfer fee. - uint256 premiumFee = 0; - uint32 tokenTransferGas = 0; - uint32 tokenTransferBytesOverhead = 0; - if (message.tokenAmounts.length > 0) { - (premiumFee, tokenTransferGas, tokenTransferBytesOverhead) = - _getTokenTransferCost(destChainSelector, message.feeToken, feeTokenPrice, message.tokenAmounts); - } else { - // Convert USD cents with 2 decimals to 18 decimals. - premiumFee = uint256(destChainDynamicConfig.networkFeeUSDCents) * 1e16; - } - - // Calculate data availability cost in USD with 36 decimals. Data availability cost exists on rollups that need to post - // transaction calldata onto another storage layer, e.g. Eth mainnet, incurring additional storage gas costs. - uint256 dataAvailabilityCost = 0; - // Only calculate data availability cost if data availability multiplier is non-zero. - // The multiplier should be set to 0 if destination chain does not charge data availability cost. - if (destChainDynamicConfig.destDataAvailabilityMultiplierBps > 0) { - dataAvailabilityCost = _getDataAvailabilityCost( - destChainSelector, - // Parse the data availability gas price stored in the higher-order 112 bits of the encoded gas price. - uint112(packedGasPrice >> Internal.GAS_PRICE_BITS), - message.data.length, - message.tokenAmounts.length, - tokenTransferBytesOverhead - ); - } - - // Calculate execution gas fee on destination chain in USD with 36 decimals. - // We add the message gas limit, the overhead gas, the gas of passing message data to receiver, and token transfer gas together. - // We then multiply this gas total with the gas multiplier and gas price, converting it into USD with 36 decimals. - // uint112(packedGasPrice) = executionGasPrice - - // TODO: revisit how generic this logic can be for non-EVM chains - - uint256 executionGasCost = destChainDynamicConfig.destGasOverhead - + (message.data.length * destChainDynamicConfig.destGasPerPayloadByte) + tokenTransferGas; - - // NOTE: when supporting non-EVM chains, revisit this and parse non-EVM args - executionGasCost += _parseEVMExtraArgsFromBytes(message.extraArgs, destChainDynamicConfig).gasLimit; - - uint256 executionCost = uint112(packedGasPrice) * executionGasCost * destChainDynamicConfig.gasMultiplierWeiPerEth; - - // Calculate number of fee tokens to charge. - // Total USD fee is in 36 decimals, feeTokenPrice is in 18 decimals USD for 1e18 smallest token denominations. - // Result of the division is the number of smallest token denominations. - return ((premiumFee * premiumMultiplierWeiPerEth) + executionCost + dataAvailabilityCost) / feeTokenPrice; - } - - /// @notice Returns the estimated data availability cost of the message. - /// @dev To save on gas, we use a single destGasPerDataAvailabilityByte value for both zero and non-zero bytes. - /// @param destChainSelector the destination chain selector. - /// @param dataAvailabilityGasPrice USD per data availability gas in 18 decimals. - /// @param messageDataLength length of the data field in the message. - /// @param numberOfTokens number of distinct token transfers in the message. - /// @param tokenTransferBytesOverhead additional token transfer data passed to destination, e.g. USDC attestation. - /// @return dataAvailabilityCostUSD36Decimal total data availability cost in USD with 36 decimals. - function _getDataAvailabilityCost( - uint64 destChainSelector, - uint112 dataAvailabilityGasPrice, - uint256 messageDataLength, - uint256 numberOfTokens, - uint32 tokenTransferBytesOverhead - ) internal view returns (uint256 dataAvailabilityCostUSD36Decimal) { - // dataAvailabilityLengthBytes sums up byte lengths of fixed message fields and dynamic message fields. - // Fixed message fields do account for the offset and length slot of the dynamic fields. - uint256 dataAvailabilityLengthBytes = Internal.ANY_2_EVM_MESSAGE_FIXED_BYTES + messageDataLength - + (numberOfTokens * Internal.ANY_2_EVM_MESSAGE_FIXED_BYTES_PER_TOKEN) + tokenTransferBytesOverhead; - - DestChainDynamicConfig storage destChainDynamicConfig = s_destChainConfig[destChainSelector].dynamicConfig; - // destDataAvailabilityOverheadGas is a separate config value for flexibility to be updated independently of message cost. - // Its value is determined by CCIP lane implementation, e.g. the overhead data posted for OCR. - uint256 dataAvailabilityGas = (dataAvailabilityLengthBytes * destChainDynamicConfig.destGasPerDataAvailabilityByte) - + destChainDynamicConfig.destDataAvailabilityOverheadGas; - - // dataAvailabilityGasPrice is in 18 decimals, destDataAvailabilityMultiplierBps is in 4 decimals - // We pad 14 decimals to bring the result to 36 decimals, in line with token bps and execution fee. - return ((dataAvailabilityGas * dataAvailabilityGasPrice) * destChainDynamicConfig.destDataAvailabilityMultiplierBps) - * 1e14; - } - - /// @notice Returns the token transfer cost parameters. - /// A basis point fee is calculated from the USD value of each token transfer. - /// For each individual transfer, this fee is between [minFeeUSD, maxFeeUSD]. - /// Total transfer fee is the sum of each individual token transfer fee. - /// @dev Assumes that tokenAmounts are validated to be listed tokens elsewhere. - /// @dev Splitting one token transfer into multiple transfers is discouraged, - /// as it will result in a transferFee equal or greater than the same amount aggregated/de-duped. - /// @param destChainSelector the destination chain selector. - /// @param feeToken address of the feeToken. - /// @param feeTokenPrice price of feeToken in USD with 18 decimals. - /// @param tokenAmounts token transfers in the message. - /// @return tokenTransferFeeUSDWei total token transfer bps fee in USD with 18 decimals. - /// @return tokenTransferGas total execution gas of the token transfers. - /// @return tokenTransferBytesOverhead additional token transfer data passed to destination, e.g. USDC attestation. - function _getTokenTransferCost( - uint64 destChainSelector, - address feeToken, - uint224 feeTokenPrice, - Client.EVMTokenAmount[] calldata tokenAmounts - ) internal view returns (uint256 tokenTransferFeeUSDWei, uint32 tokenTransferGas, uint32 tokenTransferBytesOverhead) { - uint256 numberOfTokens = tokenAmounts.length; - - for (uint256 i = 0; i < numberOfTokens; ++i) { - Client.EVMTokenAmount memory tokenAmount = tokenAmounts[i]; - - // Validate if the token is supported, do not calculate fee for unsupported tokens. - if (address(getPoolBySourceToken(destChainSelector, IERC20(tokenAmount.token))) == address(0)) { - revert UnsupportedToken(tokenAmount.token); - } - - TokenTransferFeeConfig memory transferFeeConfig = s_tokenTransferFeeConfig[destChainSelector][tokenAmount.token]; - - // If the token has no specific overrides configured, we use the global defaults. - if (!transferFeeConfig.isEnabled) { - DestChainDynamicConfig storage destChainDynamicConfig = s_destChainConfig[destChainSelector].dynamicConfig; - tokenTransferFeeUSDWei += uint256(destChainDynamicConfig.defaultTokenFeeUSDCents) * 1e16; - tokenTransferGas += destChainDynamicConfig.defaultTokenDestGasOverhead; - tokenTransferBytesOverhead += destChainDynamicConfig.defaultTokenDestBytesOverhead; - continue; - } - - uint256 bpsFeeUSDWei = 0; - // Only calculate bps fee if ratio is greater than 0. Ratio of 0 means no bps fee for a token. - // Useful for when the PriceRegistry cannot return a valid price for the token. - if (transferFeeConfig.deciBps > 0) { - uint224 tokenPrice = 0; - if (tokenAmount.token != feeToken) { - tokenPrice = IPriceRegistry(s_dynamicConfig.priceRegistry).getValidatedTokenPrice(tokenAmount.token); - } else { - tokenPrice = feeTokenPrice; - } - - // Calculate token transfer value, then apply fee ratio - // ratio represents multiples of 0.1bps, or 1e-5 - bpsFeeUSDWei = (tokenPrice._calcUSDValueFromTokenAmount(tokenAmount.amount) * transferFeeConfig.deciBps) / 1e5; - } - - tokenTransferGas += transferFeeConfig.destGasOverhead; - tokenTransferBytesOverhead += transferFeeConfig.destBytesOverhead; - - // Bps fees should be kept within range of [minFeeUSD, maxFeeUSD]. - // Convert USD values with 2 decimals to 18 decimals. - uint256 minFeeUSDWei = uint256(transferFeeConfig.minFeeUSDCents) * 1e16; - if (bpsFeeUSDWei < minFeeUSDWei) { - tokenTransferFeeUSDWei += minFeeUSDWei; - continue; - } - - uint256 maxFeeUSDWei = uint256(transferFeeConfig.maxFeeUSDCents) * 1e16; - if (bpsFeeUSDWei > maxFeeUSDWei) { - tokenTransferFeeUSDWei += maxFeeUSDWei; - continue; - } - - tokenTransferFeeUSDWei += bpsFeeUSDWei; - } - - return (tokenTransferFeeUSDWei, tokenTransferGas, tokenTransferBytesOverhead); - } - - /// @notice Updates the destination chain specific config. - /// @param destChainConfigArgs Array of source chain specific configs. - function applyDestChainConfigUpdates(DestChainConfigArgs[] memory destChainConfigArgs) external onlyOwner { - _applyDestChainConfigUpdates(destChainConfigArgs); - } - - /// @notice Internal version of applyDestChainConfigUpdates. - function _applyDestChainConfigUpdates(DestChainConfigArgs[] memory destChainConfigArgs) internal { - for (uint256 i = 0; i < destChainConfigArgs.length; ++i) { - DestChainConfigArgs memory destChainConfigArg = destChainConfigArgs[i]; - uint64 destChainSelector = destChainConfigArgs[i].destChainSelector; - - // NOTE: when supporting non-EVM chains, update chainFamilySelector validations - if ( - destChainSelector == 0 || destChainConfigArg.dynamicConfig.defaultTxGasLimit == 0 - || destChainConfigArg.dynamicConfig.chainFamilySelector != Internal.CHAIN_FAMILY_SELECTOR_EVM - ) { - revert InvalidDestChainConfig(destChainSelector); - } - - DestChainConfig storage destChainConfig = s_destChainConfig[destChainSelector]; - - DestChainConfig memory newDestChainConfig = DestChainConfig({ - dynamicConfig: destChainConfigArg.dynamicConfig, - sequenceNumber: destChainConfig.sequenceNumber, - metadataHash: destChainConfig.metadataHash - }); - - destChainConfig.dynamicConfig = newDestChainConfig.dynamicConfig; - - if (destChainConfig.metadataHash == 0) { - newDestChainConfig.metadataHash = - keccak256(abi.encode(Internal.EVM_2_ANY_MESSAGE_HASH, i_chainSelector, destChainSelector, address(this))); - destChainConfig.metadataHash = newDestChainConfig.metadataHash; - - emit DestChainAdded(destChainSelector, destChainConfig); - } else { - if (destChainConfigArg.dynamicConfig.defaultTokenDestBytesOverhead < Pool.CCIP_LOCK_OR_BURN_V1_RET_BYTES) { - revert InvalidDestBytesOverhead(address(0), destChainConfigArg.dynamicConfig.defaultTokenDestBytesOverhead); - } - - emit DestChainDynamicConfigUpdated(destChainSelector, destChainConfigArg.dynamicConfig); - } - } - } - - /// @notice Returns the destination chain config for given destination chain selector. - /// @param destChainSelector The destination chain selector. - /// @return The destination chain config. - function getDestChainConfig(uint64 destChainSelector) external view returns (DestChainConfig memory) { - return s_destChainConfig[destChainSelector]; - } - - /// @notice Gets the fee configuration for a token. - /// @param token The token to get the fee configuration for. - /// @return premiumMultiplierWeiPerEth The multiplier for destination chain specific premiums. - function getPremiumMultiplierWeiPerEth(address token) external view returns (uint64 premiumMultiplierWeiPerEth) { - return s_premiumMultiplierWeiPerEth[token]; - } - - /// @notice Sets the fee configuration for a token - /// @param premiumMultiplierWeiPerEthArgs Array of PremiumMultiplierWeiPerEthArgs structs. - function applyPremiumMultiplierWeiPerEthUpdates( - PremiumMultiplierWeiPerEthArgs[] memory premiumMultiplierWeiPerEthArgs - ) external onlyOwner { - _applyPremiumMultiplierWeiPerEthUpdates(premiumMultiplierWeiPerEthArgs); - } - - /// @dev Set the fee config. - /// @param premiumMultiplierWeiPerEthArgs The multiplier for destination chain specific premiums. - function _applyPremiumMultiplierWeiPerEthUpdates( - PremiumMultiplierWeiPerEthArgs[] memory premiumMultiplierWeiPerEthArgs - ) internal { - for (uint256 i = 0; i < premiumMultiplierWeiPerEthArgs.length; ++i) { - address token = premiumMultiplierWeiPerEthArgs[i].token; - uint64 premiumMultiplierWeiPerEth = premiumMultiplierWeiPerEthArgs[i].premiumMultiplierWeiPerEth; - s_premiumMultiplierWeiPerEth[token] = premiumMultiplierWeiPerEth; - - emit PremiumMultiplierWeiPerEthUpdated(token, premiumMultiplierWeiPerEth); - } - } - - /// @notice Gets the transfer fee config for a given token. - /// @param destChainSelector The destination chain selector. - /// @param token The token address. - function getTokenTransferFeeConfig( - uint64 destChainSelector, - address token - ) external view returns (TokenTransferFeeConfig memory tokenTransferFeeConfig) { - return s_tokenTransferFeeConfig[destChainSelector][token]; - } - - /// @notice Sets the transfer fee config. - /// @dev only callable by the owner or admin. - function applyTokenTransferFeeConfigUpdates( - TokenTransferFeeConfigArgs[] memory tokenTransferFeeConfigArgs, - TokenTransferFeeConfigRemoveArgs[] memory tokensToUseDefaultFeeConfigs - ) external onlyOwner { - _applyTokenTransferFeeConfigUpdates(tokenTransferFeeConfigArgs, tokensToUseDefaultFeeConfigs); - } - - /// @notice internal helper to set the token transfer fee config. - function _applyTokenTransferFeeConfigUpdates( - TokenTransferFeeConfigArgs[] memory tokenTransferFeeConfigArgs, - TokenTransferFeeConfigRemoveArgs[] memory tokensToUseDefaultFeeConfigs - ) internal { - for (uint256 i = 0; i < tokenTransferFeeConfigArgs.length; ++i) { - TokenTransferFeeConfigArgs memory tokenTransferFeeConfigArg = tokenTransferFeeConfigArgs[i]; - uint64 destChainSelector = tokenTransferFeeConfigArg.destChainSelector; - - for (uint256 j = 0; j < tokenTransferFeeConfigArg.tokenTransferFeeConfigs.length; ++j) { - TokenTransferFeeConfig memory tokenTransferFeeConfig = - tokenTransferFeeConfigArg.tokenTransferFeeConfigs[j].tokenTransferFeeConfig; - address token = tokenTransferFeeConfigArg.tokenTransferFeeConfigs[j].token; - - if (tokenTransferFeeConfig.destBytesOverhead < Pool.CCIP_LOCK_OR_BURN_V1_RET_BYTES) { - revert InvalidDestBytesOverhead(token, tokenTransferFeeConfig.destBytesOverhead); - } - - s_tokenTransferFeeConfig[destChainSelector][token] = tokenTransferFeeConfig; - - emit TokenTransferFeeConfigUpdated(destChainSelector, token, tokenTransferFeeConfig); - } - } + if (IRMN(i_rmnProxy).isCursed(bytes16(uint128(destChainSelector)))) revert CursedByRMN(destChainSelector); - // Remove the custom fee configs for the tokens that are in the tokensToUseDefaultFeeConfigs array - for (uint256 i = 0; i < tokensToUseDefaultFeeConfigs.length; ++i) { - uint64 destChainSelector = tokensToUseDefaultFeeConfigs[i].destChainSelector; - address token = tokensToUseDefaultFeeConfigs[i].token; - delete s_tokenTransferFeeConfig[destChainSelector][token]; - emit TokenTransferFeeConfigDeleted(destChainSelector, token); - } + return IPriceRegistry(s_dynamicConfig.priceRegistry).getValidatedFee(destChainSelector, message); } /// @notice Withdraws the outstanding fee token balances to the fee aggregator. diff --git a/contracts/src/v0.8/ccip/test/NonceManager.t.sol b/contracts/src/v0.8/ccip/test/NonceManager.t.sol index a99fc0c77a..75de4db8c5 100644 --- a/contracts/src/v0.8/ccip/test/NonceManager.t.sol +++ b/contracts/src/v0.8/ccip/test/NonceManager.t.sol @@ -244,8 +244,6 @@ contract NonceManager_OnRampUpgrade is EVM2EVMMultiOnRampSetup { NonceManager.PreviousRampsArgs(DEST_CHAIN_SELECTOR, NonceManager.PreviousRamps(address(s_prevOnRamp), address(0))); s_outboundNonceManager.applyPreviousRampsUpdates(previousRamps); - EVM2EVMMultiOnRamp.DestChainConfigArgs[] memory destChainConfigArgs = _generateDestChainConfigArgs(); - (s_onRamp, s_metadataHash) = _deployOnRamp( SOURCE_CHAIN_SELECTOR, address(s_sourceRouter), address(s_outboundNonceManager), address(s_tokenAdminRegistry) ); diff --git a/contracts/src/v0.8/ccip/test/helpers/EVM2EVMMultiOnRampHelper.sol b/contracts/src/v0.8/ccip/test/helpers/EVM2EVMMultiOnRampHelper.sol index 6261e6539b..0532697d64 100644 --- a/contracts/src/v0.8/ccip/test/helpers/EVM2EVMMultiOnRampHelper.sol +++ b/contracts/src/v0.8/ccip/test/helpers/EVM2EVMMultiOnRampHelper.sol @@ -7,56 +7,6 @@ import {IgnoreContractSize} from "./IgnoreContractSize.sol"; contract EVM2EVMMultiOnRampHelper is EVM2EVMMultiOnRamp, IgnoreContractSize { constructor( StaticConfig memory staticConfig, - DynamicConfig memory dynamicConfig, - DestChainConfigArgs[] memory destChainConfigs, - PremiumMultiplierWeiPerEthArgs[] memory premiumMultiplierWeiPerEthArgs, - TokenTransferFeeConfigArgs[] memory tokenTransferFeeConfigArgs - ) - EVM2EVMMultiOnRamp( - staticConfig, - dynamicConfig, - destChainConfigs, - premiumMultiplierWeiPerEthArgs, - tokenTransferFeeConfigArgs - ) - {} - - function getDataAvailabilityCost( - uint64 destChainSelector, - uint112 dataAvailabilityGasPrice, - uint256 messageDataLength, - uint256 numberOfTokens, - uint32 tokenTransferBytesOverhead - ) external view returns (uint256) { - return _getDataAvailabilityCost( - destChainSelector, dataAvailabilityGasPrice, messageDataLength, numberOfTokens, tokenTransferBytesOverhead - ); - } - - function getTokenTransferCost( - uint64 destChainSelector, - address feeToken, - uint224 feeTokenPrice, - Client.EVMTokenAmount[] calldata tokenAmounts - ) external view returns (uint256, uint32, uint32) { - return _getTokenTransferCost(destChainSelector, feeToken, feeTokenPrice, tokenAmounts); - } - - function parseEVMExtraArgsFromBytes( - bytes calldata extraArgs, - uint64 destChainSelector - ) external view returns (Client.EVMExtraArgsV2 memory) { - return _parseEVMExtraArgsFromBytes(extraArgs, s_destChainConfig[destChainSelector].dynamicConfig); - } - - function validateDestFamilyAddress(bytes4 chainFamilySelector, bytes memory destAddress) external pure { - _validateDestFamilyAddress(chainFamilySelector, destAddress); - } - - function convertParsedExtraArgs( - bytes calldata extraArgs, - DestChainDynamicConfig memory destChainDynamicConfig - ) external pure returns (bytes memory encodedExtraArgs) { - return _convertParsedExtraArgs(extraArgs, destChainDynamicConfig); - } + DynamicConfig memory dynamicConfig + ) EVM2EVMMultiOnRamp(staticConfig, dynamicConfig) {} } diff --git a/contracts/src/v0.8/ccip/test/helpers/PriceRegistryHelper.sol b/contracts/src/v0.8/ccip/test/helpers/PriceRegistryHelper.sol new file mode 100644 index 0000000000..6a8d739097 --- /dev/null +++ b/contracts/src/v0.8/ccip/test/helpers/PriceRegistryHelper.sol @@ -0,0 +1,72 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity 0.8.24; + +import {PriceRegistry} from "../../PriceRegistry.sol"; +import {Client} from "../../libraries/Client.sol"; + +contract PriceRegistryHelper is PriceRegistry { + constructor( + StaticConfig memory staticConfig, + address[] memory priceUpdaters, + address[] memory feeTokens, + TokenPriceFeedUpdate[] memory tokenPriceFeeds, + TokenTransferFeeConfigArgs[] memory tokenTransferFeeConfigArgs, + PremiumMultiplierWeiPerEthArgs[] memory premiumMultiplierWeiPerEthArgs, + DestChainDynamicConfigArgs[] memory destChainConfigArgs + ) + PriceRegistry( + staticConfig, + priceUpdaters, + feeTokens, + tokenPriceFeeds, + tokenTransferFeeConfigArgs, + premiumMultiplierWeiPerEthArgs, + destChainConfigArgs + ) + {} + + function getDataAvailabilityCost( + uint64 destChainSelector, + uint112 dataAvailabilityGasPrice, + uint256 messageDataLength, + uint256 numberOfTokens, + uint32 tokenTransferBytesOverhead + ) external view returns (uint256) { + return _getDataAvailabilityCost( + s_destChainDynamicConfigs[destChainSelector], + dataAvailabilityGasPrice, + messageDataLength, + numberOfTokens, + tokenTransferBytesOverhead + ); + } + + function getTokenTransferCost( + uint64 destChainSelector, + address feeToken, + uint224 feeTokenPrice, + Client.EVMTokenAmount[] calldata tokenAmounts + ) external view returns (uint256, uint32, uint32) { + return _getTokenTransferCost( + s_destChainDynamicConfigs[destChainSelector], destChainSelector, feeToken, feeTokenPrice, tokenAmounts + ); + } + + function parseEVMExtraArgsFromBytes( + bytes calldata extraArgs, + uint64 destChainSelector + ) external view returns (Client.EVMExtraArgsV2 memory) { + return _parseEVMExtraArgsFromBytes(extraArgs, s_destChainDynamicConfigs[destChainSelector]); + } + + function parseEVMExtraArgsFromBytes( + bytes calldata extraArgs, + DestChainDynamicConfig memory destChainDynamicConfig + ) external pure returns (Client.EVMExtraArgsV2 memory) { + return _parseEVMExtraArgsFromBytes(extraArgs, destChainDynamicConfig); + } + + function validateDestFamilyAddress(bytes4 chainFamilySelector, bytes memory destAddress) external pure { + _validateDestFamilyAddress(chainFamilySelector, destAddress); + } +} diff --git a/contracts/src/v0.8/ccip/test/onRamp/EVM2EVMMultiOnRamp.t.sol b/contracts/src/v0.8/ccip/test/onRamp/EVM2EVMMultiOnRamp.t.sol index 2cc1de1ddd..5324eabaef 100644 --- a/contracts/src/v0.8/ccip/test/onRamp/EVM2EVMMultiOnRamp.t.sol +++ b/contracts/src/v0.8/ccip/test/onRamp/EVM2EVMMultiOnRamp.t.sol @@ -20,9 +20,7 @@ import "./EVM2EVMMultiOnRampSetup.t.sol"; contract EVM2EVMMultiOnRamp_constructor is EVM2EVMMultiOnRampSetup { function test_Constructor_Success() public { EVM2EVMMultiOnRamp.StaticConfig memory staticConfig = EVM2EVMMultiOnRamp.StaticConfig({ - linkToken: s_sourceTokens[0], chainSelector: SOURCE_CHAIN_SELECTOR, - maxFeeJuelsPerMsg: MAX_MSG_FEES_JUELS, rmnProxy: address(s_mockRMN), nonceManager: address(s_outboundNonceManager), tokenAdminRegistry: address(s_tokenAdminRegistry) @@ -30,98 +28,35 @@ contract EVM2EVMMultiOnRamp_constructor is EVM2EVMMultiOnRampSetup { EVM2EVMMultiOnRamp.DynamicConfig memory dynamicConfig = _generateDynamicMultiOnRampConfig(address(s_sourceRouter), address(s_priceRegistry)); - EVM2EVMMultiOnRamp.DestChainConfigArgs[] memory destChainConfigArgs = _generateDestChainConfigArgs(); - EVM2EVMMultiOnRamp.DestChainConfigArgs memory destChainConfigArg = destChainConfigArgs[0]; - vm.expectEmit(); emit EVM2EVMMultiOnRamp.ConfigSet(staticConfig, dynamicConfig); - // We ignore the DestChainConfig values as metadataHash is reliant on contract address. - vm.expectEmit(true, false, false, false); - emit EVM2EVMMultiOnRamp.DestChainAdded( - DEST_CHAIN_SELECTOR, - EVM2EVMMultiOnRamp.DestChainConfig({ - dynamicConfig: destChainConfigArg.dynamicConfig, - sequenceNumber: 0, - metadataHash: "" - }) - ); - vm.expectEmit(); - emit EVM2EVMMultiOnRamp.PremiumMultiplierWeiPerEthUpdated( - s_premiumMultiplierWeiPerEthArgs[0].token, s_premiumMultiplierWeiPerEthArgs[0].premiumMultiplierWeiPerEth - ); - vm.expectEmit(); - emit EVM2EVMMultiOnRamp.PremiumMultiplierWeiPerEthUpdated( - s_premiumMultiplierWeiPerEthArgs[1].token, s_premiumMultiplierWeiPerEthArgs[1].premiumMultiplierWeiPerEth - ); _deployOnRamp( SOURCE_CHAIN_SELECTOR, address(s_sourceRouter), address(s_outboundNonceManager), address(s_tokenAdminRegistry) ); - EVM2EVMMultiOnRamp.DestChainConfig memory expectedDestChainConfig = EVM2EVMMultiOnRamp.DestChainConfig({ - dynamicConfig: destChainConfigArg.dynamicConfig, - sequenceNumber: 0, - metadataHash: keccak256( - abi.encode( - Internal.EVM_2_ANY_MESSAGE_HASH, SOURCE_CHAIN_SELECTOR, destChainConfigArg.destChainSelector, address(s_onRamp) - ) - ) - }); - EVM2EVMMultiOnRamp.StaticConfig memory gotStaticConfig = s_onRamp.getStaticConfig(); _assertStaticConfigsEqual(staticConfig, gotStaticConfig); EVM2EVMMultiOnRamp.DynamicConfig memory gotDynamicConfig = s_onRamp.getDynamicConfig(); _assertDynamicConfigsEqual(dynamicConfig, gotDynamicConfig); - EVM2EVMMultiOnRamp.DestChainConfig memory gotDestChainConfig = s_onRamp.getDestChainConfig(DEST_CHAIN_SELECTOR); - _assertDestChainConfigsEqual(expectedDestChainConfig, gotDestChainConfig); - - uint64 gotFeeTokenConfig0 = s_onRamp.getPremiumMultiplierWeiPerEth(s_premiumMultiplierWeiPerEthArgs[0].token); - assertEq(s_premiumMultiplierWeiPerEthArgs[0].premiumMultiplierWeiPerEth, gotFeeTokenConfig0); - - uint64 gotFeeTokenConfig1 = s_onRamp.getPremiumMultiplierWeiPerEth(s_premiumMultiplierWeiPerEthArgs[1].token); - assertEq(s_premiumMultiplierWeiPerEthArgs[1].premiumMultiplierWeiPerEth, gotFeeTokenConfig1); - // Initial values assertEq("EVM2EVMMultiOnRamp 1.6.0-dev", s_onRamp.typeAndVersion()); assertEq(OWNER, s_onRamp.owner()); - assertEq(1, s_onRamp.getExpectedNextSequenceNumber(destChainConfigArg.destChainSelector)); - } - - function test_Constructor_InvalidConfigLinkTokenEqAddressZero_Revert() public { - vm.expectRevert(EVM2EVMMultiOnRamp.InvalidConfig.selector); - new EVM2EVMMultiOnRampHelper( - EVM2EVMMultiOnRamp.StaticConfig({ - linkToken: address(0), - chainSelector: SOURCE_CHAIN_SELECTOR, - maxFeeJuelsPerMsg: MAX_NOP_FEES_JUELS, - rmnProxy: address(s_mockRMN), - nonceManager: address(s_outboundNonceManager), - tokenAdminRegistry: address(s_tokenAdminRegistry) - }), - _generateDynamicMultiOnRampConfig(address(s_sourceRouter), address(s_priceRegistry)), - _generateDestChainConfigArgs(), - s_premiumMultiplierWeiPerEthArgs, - s_tokenTransferFeeConfigArgs - ); + assertEq(1, s_onRamp.getExpectedNextSequenceNumber(DEST_CHAIN_SELECTOR)); } - function test_Constructor_InvalidConfigLinkChainSelectorEqZero_Revert() public { + function test_Constructor_InvalidConfigChainSelectorEqZero_Revert() public { vm.expectRevert(EVM2EVMMultiOnRamp.InvalidConfig.selector); new EVM2EVMMultiOnRampHelper( EVM2EVMMultiOnRamp.StaticConfig({ - linkToken: s_sourceTokens[0], chainSelector: 0, - maxFeeJuelsPerMsg: MAX_NOP_FEES_JUELS, rmnProxy: address(s_mockRMN), nonceManager: address(s_outboundNonceManager), tokenAdminRegistry: address(s_tokenAdminRegistry) }), - _generateDynamicMultiOnRampConfig(address(s_sourceRouter), address(s_priceRegistry)), - _generateDestChainConfigArgs(), - s_premiumMultiplierWeiPerEthArgs, - s_tokenTransferFeeConfigArgs + _generateDynamicMultiOnRampConfig(address(s_sourceRouter), address(s_priceRegistry)) ); } @@ -129,17 +64,12 @@ contract EVM2EVMMultiOnRamp_constructor is EVM2EVMMultiOnRampSetup { vm.expectRevert(EVM2EVMMultiOnRamp.InvalidConfig.selector); s_onRamp = new EVM2EVMMultiOnRampHelper( EVM2EVMMultiOnRamp.StaticConfig({ - linkToken: s_sourceTokens[0], chainSelector: SOURCE_CHAIN_SELECTOR, - maxFeeJuelsPerMsg: MAX_NOP_FEES_JUELS, rmnProxy: address(0), nonceManager: address(s_outboundNonceManager), tokenAdminRegistry: address(s_tokenAdminRegistry) }), - _generateDynamicMultiOnRampConfig(address(s_sourceRouter), address(s_priceRegistry)), - _generateDestChainConfigArgs(), - s_premiumMultiplierWeiPerEthArgs, - s_tokenTransferFeeConfigArgs + _generateDynamicMultiOnRampConfig(address(s_sourceRouter), address(s_priceRegistry)) ); } @@ -147,17 +77,12 @@ contract EVM2EVMMultiOnRamp_constructor is EVM2EVMMultiOnRampSetup { vm.expectRevert(EVM2EVMMultiOnRamp.InvalidConfig.selector); new EVM2EVMMultiOnRampHelper( EVM2EVMMultiOnRamp.StaticConfig({ - linkToken: s_sourceTokens[0], chainSelector: SOURCE_CHAIN_SELECTOR, - maxFeeJuelsPerMsg: MAX_NOP_FEES_JUELS, rmnProxy: address(s_mockRMN), nonceManager: address(0), tokenAdminRegistry: address(s_tokenAdminRegistry) }), - _generateDynamicMultiOnRampConfig(address(s_sourceRouter), address(s_priceRegistry)), - _generateDestChainConfigArgs(), - s_premiumMultiplierWeiPerEthArgs, - s_tokenTransferFeeConfigArgs + _generateDynamicMultiOnRampConfig(address(s_sourceRouter), address(s_priceRegistry)) ); } @@ -165,179 +90,13 @@ contract EVM2EVMMultiOnRamp_constructor is EVM2EVMMultiOnRampSetup { vm.expectRevert(EVM2EVMMultiOnRamp.InvalidConfig.selector); new EVM2EVMMultiOnRampHelper( EVM2EVMMultiOnRamp.StaticConfig({ - linkToken: s_sourceTokens[0], chainSelector: SOURCE_CHAIN_SELECTOR, - maxFeeJuelsPerMsg: MAX_NOP_FEES_JUELS, rmnProxy: address(s_mockRMN), nonceManager: address(s_outboundNonceManager), tokenAdminRegistry: address(0) }), - _generateDynamicMultiOnRampConfig(address(s_sourceRouter), address(s_priceRegistry)), - _generateDestChainConfigArgs(), - s_premiumMultiplierWeiPerEthArgs, - s_tokenTransferFeeConfigArgs - ); - } -} - -contract EVM2EVMMultiOnRamp_applyDestChainConfigUpdates is EVM2EVMMultiOnRampSetup { - function test_Fuzz_applyDestChainConfigUpdates_Success( - EVM2EVMMultiOnRamp.DestChainConfigArgs memory destChainConfigArgs - ) public { - vm.assume(destChainConfigArgs.destChainSelector != 0); - vm.assume(destChainConfigArgs.dynamicConfig.defaultTxGasLimit != 0); - destChainConfigArgs.dynamicConfig.defaultTokenDestBytesOverhead = uint32( - bound( - destChainConfigArgs.dynamicConfig.defaultTokenDestBytesOverhead, - Pool.CCIP_LOCK_OR_BURN_V1_RET_BYTES, - type(uint32).max - ) - ); - destChainConfigArgs.dynamicConfig.chainFamilySelector = Internal.CHAIN_FAMILY_SELECTOR_EVM; - - bool isNewChain = destChainConfigArgs.destChainSelector != DEST_CHAIN_SELECTOR; - - EVM2EVMMultiOnRamp.DestChainConfigArgs[] memory newDestChainConfigArgs = - new EVM2EVMMultiOnRamp.DestChainConfigArgs[](1); - newDestChainConfigArgs[0] = destChainConfigArgs; - EVM2EVMMultiOnRamp.DestChainConfig memory expectedDestChainConfig = EVM2EVMMultiOnRamp.DestChainConfig({ - dynamicConfig: destChainConfigArgs.dynamicConfig, - sequenceNumber: 0, - metadataHash: keccak256( - abi.encode( - Internal.EVM_2_ANY_MESSAGE_HASH, SOURCE_CHAIN_SELECTOR, destChainConfigArgs.destChainSelector, address(s_onRamp) - ) - ) - }); - - if (isNewChain) { - vm.expectEmit(); - emit EVM2EVMMultiOnRamp.DestChainAdded(destChainConfigArgs.destChainSelector, expectedDestChainConfig); - } else { - vm.expectEmit(); - emit EVM2EVMMultiOnRamp.DestChainDynamicConfigUpdated( - destChainConfigArgs.destChainSelector, expectedDestChainConfig.dynamicConfig - ); - } - - s_onRamp.applyDestChainConfigUpdates(newDestChainConfigArgs); - - _assertDestChainConfigsEqual( - expectedDestChainConfig, s_onRamp.getDestChainConfig(destChainConfigArgs.destChainSelector) - ); - } - - function test_applyDestChainConfigUpdates_Success() public { - EVM2EVMMultiOnRamp.DestChainConfigArgs[] memory destChainConfigArgs = - new EVM2EVMMultiOnRamp.DestChainConfigArgs[](2); - destChainConfigArgs[0] = _generateDestChainConfigArgs()[0]; - destChainConfigArgs[0].dynamicConfig.isEnabled = false; - destChainConfigArgs[1] = _generateDestChainConfigArgs()[0]; - destChainConfigArgs[1].destChainSelector = DEST_CHAIN_SELECTOR + 1; - - EVM2EVMMultiOnRamp.DestChainConfig memory expectedDestChainConfig0 = EVM2EVMMultiOnRamp.DestChainConfig({ - dynamicConfig: destChainConfigArgs[0].dynamicConfig, - sequenceNumber: 0, - metadataHash: keccak256( - abi.encode( - Internal.EVM_2_ANY_MESSAGE_HASH, - SOURCE_CHAIN_SELECTOR, - destChainConfigArgs[0].destChainSelector, - address(s_onRamp) - ) - ) - }); - - EVM2EVMMultiOnRamp.DestChainConfig memory expectedDestChainConfig1 = EVM2EVMMultiOnRamp.DestChainConfig({ - dynamicConfig: destChainConfigArgs[1].dynamicConfig, - sequenceNumber: 0, - metadataHash: keccak256( - abi.encode( - Internal.EVM_2_ANY_MESSAGE_HASH, - SOURCE_CHAIN_SELECTOR, - destChainConfigArgs[1].destChainSelector, - address(s_onRamp) - ) - ) - }); - - vm.expectEmit(); - emit EVM2EVMMultiOnRamp.DestChainDynamicConfigUpdated(DEST_CHAIN_SELECTOR, expectedDestChainConfig0.dynamicConfig); - vm.expectEmit(); - emit EVM2EVMMultiOnRamp.DestChainAdded(DEST_CHAIN_SELECTOR + 1, expectedDestChainConfig1); - - vm.recordLogs(); - s_onRamp.applyDestChainConfigUpdates(destChainConfigArgs); - - EVM2EVMMultiOnRamp.DestChainConfig memory gotDestChainConfig0 = s_onRamp.getDestChainConfig(DEST_CHAIN_SELECTOR); - EVM2EVMMultiOnRamp.DestChainConfig memory gotDestChainConfig1 = s_onRamp.getDestChainConfig(DEST_CHAIN_SELECTOR + 1); - - assertEq(vm.getRecordedLogs().length, 2); - _assertDestChainConfigsEqual(expectedDestChainConfig0, gotDestChainConfig0); - _assertDestChainConfigsEqual(expectedDestChainConfig1, gotDestChainConfig1); - } - - function test_applyDestChainConfigUpdatesZeroIntput() public { - EVM2EVMMultiOnRamp.DestChainConfigArgs[] memory destChainConfigArgs = - new EVM2EVMMultiOnRamp.DestChainConfigArgs[](0); - - vm.recordLogs(); - s_onRamp.applyDestChainConfigUpdates(destChainConfigArgs); - - assertEq(vm.getRecordedLogs().length, 0); - } - - // Reverts - - function test_InvalidDestChainConfigDestChainSelectorEqZero_Revert() public { - EVM2EVMMultiOnRamp.DestChainConfigArgs[] memory destChainConfigArgs = _generateDestChainConfigArgs(); - EVM2EVMMultiOnRamp.DestChainConfigArgs memory destChainConfigArg = destChainConfigArgs[0]; - - destChainConfigArg.destChainSelector = 0; - vm.expectRevert( - abi.encodeWithSelector(EVM2EVMMultiOnRamp.InvalidDestChainConfig.selector, destChainConfigArg.destChainSelector) - ); - s_onRamp.applyDestChainConfigUpdates(destChainConfigArgs); - } - - function test_applyDestChainConfigUpdatesDefaultTxGasLimitEqZero_Revert() public { - EVM2EVMMultiOnRamp.DestChainConfigArgs[] memory destChainConfigArgs = _generateDestChainConfigArgs(); - EVM2EVMMultiOnRamp.DestChainConfigArgs memory destChainConfigArg = destChainConfigArgs[0]; - - destChainConfigArg.dynamicConfig.defaultTxGasLimit = 0; - vm.expectRevert( - abi.encodeWithSelector(EVM2EVMMultiOnRamp.InvalidDestChainConfig.selector, destChainConfigArg.destChainSelector) - ); - s_onRamp.applyDestChainConfigUpdates(destChainConfigArgs); - } - - function test_InvalidDestBytesOverhead_Revert() public { - EVM2EVMMultiOnRamp.DestChainConfigArgs[] memory destChainConfigArgs = _generateDestChainConfigArgs(); - EVM2EVMMultiOnRamp.DestChainConfigArgs memory destChainConfigArg = destChainConfigArgs[0]; - - destChainConfigArg.dynamicConfig.defaultTokenDestBytesOverhead = uint32(Pool.CCIP_LOCK_OR_BURN_V1_RET_BYTES - 1); - - vm.expectRevert( - abi.encodeWithSelector( - EVM2EVMMultiOnRamp.InvalidDestBytesOverhead.selector, - address(0), - destChainConfigArg.dynamicConfig.defaultTokenDestBytesOverhead - ) - ); - - s_onRamp.applyDestChainConfigUpdates(destChainConfigArgs); - } - - function test_InvalidChainFamilySelector_Revert() public { - EVM2EVMMultiOnRamp.DestChainConfigArgs[] memory destChainConfigArgs = _generateDestChainConfigArgs(); - EVM2EVMMultiOnRamp.DestChainConfigArgs memory destChainConfigArg = destChainConfigArgs[0]; - - destChainConfigArg.dynamicConfig.chainFamilySelector = bytes4(uint32(1)); - - vm.expectRevert( - abi.encodeWithSelector(EVM2EVMMultiOnRamp.InvalidDestChainConfig.selector, destChainConfigArg.destChainSelector) + _generateDynamicMultiOnRampConfig(address(s_sourceRouter), address(s_priceRegistry)) ); - s_onRamp.applyDestChainConfigUpdates(destChainConfigArgs); } } @@ -392,13 +151,9 @@ contract EVM2EVMMultiOnRamp_forwardFromRouter is EVM2EVMMultiOnRampSetup { uint256 feeAmount = 1234567890; IERC20(s_sourceFeeToken).transferFrom(OWNER, address(s_onRamp), feeAmount); - Client.EVM2AnyMessage memory expectedMessage = _generateEmptyMessage(); - expectedMessage.extraArgs = Client._argsToBytes(Client.EVMExtraArgsV1({gasLimit: GAS_LIMIT})); vm.expectEmit(); // We expect the message to be emitted with strict = false. - emit EVM2EVMMultiOnRamp.CCIPSendRequested( - DEST_CHAIN_SELECTOR, _messageToEvent(expectedMessage, 1, 1, feeAmount, OWNER) - ); + emit EVM2EVMMultiOnRamp.CCIPSendRequested(DEST_CHAIN_SELECTOR, _messageToEvent(message, 1, 1, feeAmount, OWNER)); s_onRamp.forwardFromRouter(DEST_CHAIN_SELECTOR, message, feeAmount, OWNER); } @@ -443,50 +198,12 @@ contract EVM2EVMMultiOnRamp_forwardFromRouter is EVM2EVMMultiOnRampSetup { s_onRamp.forwardFromRouter(DEST_CHAIN_SELECTOR, message, feeAmount, OWNER); } - function test_Fuzz_EnforceOutOfOrder(bool enforce, bool allowOutOfOrderExecution) public { - // Update dynamic config to enforce allowOutOfOrderExecution = defaultVal. - vm.stopPrank(); - vm.startPrank(OWNER); - - EVM2EVMMultiOnRamp.DestChainConfigArgs[] memory destChainConfigArgs = _generateDestChainConfigArgs(); - destChainConfigArgs[0].dynamicConfig.enforceOutOfOrder = enforce; - s_onRamp.applyDestChainConfigUpdates(destChainConfigArgs); - - vm.stopPrank(); - - vm.startPrank(address(s_sourceRouter)); - Client.EVM2AnyMessage memory message = _generateEmptyMessage(); - message.extraArgs = abi.encodeWithSelector( - Client.EVM_EXTRA_ARGS_V2_TAG, - Client.EVMExtraArgsV2({gasLimit: GAS_LIMIT * 2, allowOutOfOrderExecution: allowOutOfOrderExecution}) - ); - uint256 feeAmount = 1234567890; - IERC20(s_sourceFeeToken).transferFrom(OWNER, address(s_onRamp), feeAmount); - - if (enforce) { - // If enforcement is on, only true should be allowed. - if (allowOutOfOrderExecution) { - vm.expectEmit(); - emit EVM2EVMMultiOnRamp.CCIPSendRequested(DEST_CHAIN_SELECTOR, _messageToEvent(message, 1, 1, feeAmount, OWNER)); - s_onRamp.forwardFromRouter(DEST_CHAIN_SELECTOR, message, feeAmount, OWNER); - } else { - vm.expectRevert(EVM2EVMMultiOnRamp.ExtraArgOutOfOrderExecutionMustBeTrue.selector); - s_onRamp.forwardFromRouter(DEST_CHAIN_SELECTOR, message, feeAmount, OWNER); - } - } else { - // no enforcement should allow any value. - vm.expectEmit(); - emit EVM2EVMMultiOnRamp.CCIPSendRequested(DEST_CHAIN_SELECTOR, _messageToEvent(message, 1, 1, feeAmount, OWNER)); - s_onRamp.forwardFromRouter(DEST_CHAIN_SELECTOR, message, feeAmount, OWNER); - } - } - function test_ShouldIncrementSeqNumAndNonce_Success() public { Client.EVM2AnyMessage memory message = _generateEmptyMessage(); for (uint64 i = 1; i < 4; ++i) { uint64 nonceBefore = s_outboundNonceManager.getOutboundNonce(DEST_CHAIN_SELECTOR, OWNER); - uint64 sequenceNumberBefore = s_onRamp.getDestChainConfig(DEST_CHAIN_SELECTOR).sequenceNumber; + uint64 sequenceNumberBefore = s_onRamp.getExpectedNextSequenceNumber(DEST_CHAIN_SELECTOR) - 1; vm.expectEmit(); emit EVM2EVMMultiOnRamp.CCIPSendRequested(DEST_CHAIN_SELECTOR, _messageToEvent(message, i, i, 0, OWNER)); @@ -494,7 +211,7 @@ contract EVM2EVMMultiOnRamp_forwardFromRouter is EVM2EVMMultiOnRampSetup { s_onRamp.forwardFromRouter(DEST_CHAIN_SELECTOR, message, 0, OWNER); uint64 nonceAfter = s_outboundNonceManager.getOutboundNonce(DEST_CHAIN_SELECTOR, OWNER); - uint64 sequenceNumberAfter = s_onRamp.getDestChainConfig(DEST_CHAIN_SELECTOR).sequenceNumber; + uint64 sequenceNumberAfter = s_onRamp.getExpectedNextSequenceNumber(DEST_CHAIN_SELECTOR) - 1; assertEq(nonceAfter, nonceBefore + 1); assertEq(sequenceNumberAfter, sequenceNumberBefore + 1); } @@ -508,7 +225,7 @@ contract EVM2EVMMultiOnRamp_forwardFromRouter is EVM2EVMMultiOnRampSetup { for (uint64 i = 1; i < 4; ++i) { uint64 nonceBefore = s_outboundNonceManager.getOutboundNonce(DEST_CHAIN_SELECTOR, OWNER); - uint64 sequenceNumberBefore = s_onRamp.getDestChainConfig(DEST_CHAIN_SELECTOR).sequenceNumber; + uint64 sequenceNumberBefore = s_onRamp.getExpectedNextSequenceNumber(DEST_CHAIN_SELECTOR) - 1; vm.expectEmit(); emit EVM2EVMMultiOnRamp.CCIPSendRequested(DEST_CHAIN_SELECTOR, _messageToEvent(message, i, i, 0, OWNER)); @@ -516,7 +233,7 @@ contract EVM2EVMMultiOnRamp_forwardFromRouter is EVM2EVMMultiOnRampSetup { s_onRamp.forwardFromRouter(DEST_CHAIN_SELECTOR, message, 0, OWNER); uint64 nonceAfter = s_outboundNonceManager.getOutboundNonce(DEST_CHAIN_SELECTOR, OWNER); - uint64 sequenceNumberAfter = s_onRamp.getDestChainConfig(DEST_CHAIN_SELECTOR).sequenceNumber; + uint64 sequenceNumberAfter = s_onRamp.getExpectedNextSequenceNumber(DEST_CHAIN_SELECTOR) - 1; assertEq(nonceAfter, nonceBefore); assertEq(sequenceNumberAfter, sequenceNumberBefore + 1); } @@ -625,12 +342,6 @@ contract EVM2EVMMultiOnRamp_forwardFromRouter is EVM2EVMMultiOnRampSetup { s_onRamp.forwardFromRouter(DEST_CHAIN_SELECTOR, message, 0, OWNER); } - function test_Unhealthy_Revert() public { - s_mockRMN.setGlobalCursed(true); - vm.expectRevert(abi.encodeWithSelector(EVM2EVMMultiOnRamp.CursedByRMN.selector, DEST_CHAIN_SELECTOR)); - s_onRamp.forwardFromRouter(DEST_CHAIN_SELECTOR, _generateEmptyMessage(), 0, OWNER); - } - function test_Permissions_Revert() public { vm.stopPrank(); vm.startPrank(OWNER); @@ -643,24 +354,6 @@ contract EVM2EVMMultiOnRamp_forwardFromRouter is EVM2EVMMultiOnRampSetup { s_onRamp.forwardFromRouter(DEST_CHAIN_SELECTOR, _generateEmptyMessage(), 0, address(0)); } - function test_MessageTooLarge_Revert() public { - Client.EVM2AnyMessage memory message = _generateEmptyMessage(); - message.data = new bytes(MAX_DATA_SIZE + 1); - vm.expectRevert( - abi.encodeWithSelector(EVM2EVMMultiOnRamp.MessageTooLarge.selector, MAX_DATA_SIZE, message.data.length) - ); - - s_onRamp.forwardFromRouter(DEST_CHAIN_SELECTOR, message, 0, STRANGER); - } - - function test_TooManyTokens_Revert() public { - Client.EVM2AnyMessage memory message = _generateEmptyMessage(); - uint256 tooMany = MAX_TOKENS_LENGTH + 1; - message.tokenAmounts = new Client.EVMTokenAmount[](tooMany); - vm.expectRevert(EVM2EVMMultiOnRamp.UnsupportedNumberOfTokens.selector); - s_onRamp.forwardFromRouter(DEST_CHAIN_SELECTOR, message, 0, STRANGER); - } - function test_MessageValidationError_Revert() public { _enableOutboundMessageValidator(); @@ -715,64 +408,27 @@ contract EVM2EVMMultiOnRamp_forwardFromRouter is EVM2EVMMultiOnRampSetup { s_onRamp.forwardFromRouter(DEST_CHAIN_SELECTOR, message, 0, OWNER); } - // Asserts gasLimit must be <=maxGasLimit - function test_MessageGasLimitTooHigh_Revert() public { - Client.EVM2AnyMessage memory message = _generateEmptyMessage(); - message.extraArgs = Client._argsToBytes(Client.EVMExtraArgsV1({gasLimit: MAX_GAS_LIMIT + 1})); - vm.expectRevert(abi.encodeWithSelector(EVM2EVMMultiOnRamp.MessageGasLimitTooHigh.selector)); - s_onRamp.forwardFromRouter(DEST_CHAIN_SELECTOR, message, 0, OWNER); - } - - function test_InvalidAddressEncodePacked_Revert() public { - Client.EVM2AnyMessage memory message = _generateEmptyMessage(); - message.receiver = abi.encodePacked(address(234)); - - vm.expectRevert(abi.encodeWithSelector(Internal.InvalidEVMAddress.selector, message.receiver)); - - s_onRamp.forwardFromRouter(DEST_CHAIN_SELECTOR, message, 1, OWNER); - } - - function test_InvalidEVMAddress_Revert() public { - Client.EVM2AnyMessage memory message = _generateEmptyMessage(); - message.receiver = abi.encode(type(uint208).max); - - vm.expectRevert(abi.encodeWithSelector(Internal.InvalidEVMAddress.selector, message.receiver)); - - s_onRamp.forwardFromRouter(DEST_CHAIN_SELECTOR, message, 1, OWNER); - } - - // We disallow sending to addresses 0-9. - function test_ZeroAddressReceiver_Revert() public { + function test_forwardFromRouter_UnsupportedToken_Revert() public { Client.EVM2AnyMessage memory message = _generateEmptyMessage(); + message.tokenAmounts = new Client.EVMTokenAmount[](1); + message.tokenAmounts[0].amount = 1; + message.tokenAmounts[0].token = address(1); - for (uint160 i = 0; i < 10; ++i) { - message.receiver = abi.encode(address(i)); - - vm.expectRevert(abi.encodeWithSelector(Internal.InvalidEVMAddress.selector, message.receiver)); + vm.expectRevert(abi.encodeWithSelector(EVM2EVMMultiOnRamp.UnsupportedToken.selector, message.tokenAmounts[0].token)); - s_onRamp.forwardFromRouter(DEST_CHAIN_SELECTOR, message, 1, OWNER); - } + s_onRamp.forwardFromRouter(DEST_CHAIN_SELECTOR, message, 0, OWNER); } function test_MesssageFeeTooHigh_Revert() public { Client.EVM2AnyMessage memory message = _generateEmptyMessage(); vm.expectRevert( - abi.encodeWithSelector(EVM2EVMMultiOnRamp.MessageFeeTooHigh.selector, MAX_MSG_FEES_JUELS + 1, MAX_MSG_FEES_JUELS) + abi.encodeWithSelector(PriceRegistry.MessageFeeTooHigh.selector, MAX_MSG_FEES_JUELS + 1, MAX_MSG_FEES_JUELS) ); s_onRamp.forwardFromRouter(DEST_CHAIN_SELECTOR, message, MAX_MSG_FEES_JUELS + 1, OWNER); } - function test_InvalidChainSelector_Revert() public { - Client.EVM2AnyMessage memory message = _generateEmptyMessage(); - - uint64 wrongChainSelector = DEST_CHAIN_SELECTOR + 1; - vm.expectRevert(abi.encodeWithSelector(EVM2EVMMultiOnRamp.DestinationChainNotEnabled.selector, wrongChainSelector)); - - s_onRamp.forwardFromRouter(wrongChainSelector, message, 1, OWNER); - } - function test_SourceTokenDataTooLarge_Revert() public { address sourceETH = s_sourceTokens[1]; vm.stopPrank(); @@ -817,16 +473,16 @@ contract EVM2EVMMultiOnRamp_forwardFromRouter is EVM2EVMMultiOnRampSetup { newPool.setSourceTokenData(new bytes(Pool.CCIP_LOCK_OR_BURN_V1_RET_BYTES + 1)); vm.startPrank(address(s_sourceRouter)); - vm.expectRevert(abi.encodeWithSelector(EVM2EVMMultiOnRamp.SourceTokenDataTooLarge.selector, sourceETH)); + vm.expectRevert(abi.encodeWithSelector(PriceRegistry.SourceTokenDataTooLarge.selector, sourceETH)); s_onRamp.forwardFromRouter(DEST_CHAIN_SELECTOR, message, 0, OWNER); // Set token config to allow larger data vm.startPrank(OWNER); - EVM2EVMMultiOnRamp.TokenTransferFeeConfigArgs[] memory tokenTransferFeeConfigArgs = + PriceRegistry.TokenTransferFeeConfigArgs[] memory tokenTransferFeeConfigArgs = _generateTokenTransferFeeConfigArgs(1, 1); tokenTransferFeeConfigArgs[0].destChainSelector = DEST_CHAIN_SELECTOR; tokenTransferFeeConfigArgs[0].tokenTransferFeeConfigs[0].token = sourceETH; - tokenTransferFeeConfigArgs[0].tokenTransferFeeConfigs[0].tokenTransferFeeConfig = EVM2EVMMultiOnRamp + tokenTransferFeeConfigArgs[0].tokenTransferFeeConfigs[0].tokenTransferFeeConfig = PriceRegistry .TokenTransferFeeConfig({ minFeeUSDCents: 1, maxFeeUSDCents: 0, @@ -835,8 +491,8 @@ contract EVM2EVMMultiOnRamp_forwardFromRouter is EVM2EVMMultiOnRampSetup { destBytesOverhead: uint32(Pool.CCIP_LOCK_OR_BURN_V1_RET_BYTES) + 32, isEnabled: true }); - s_onRamp.applyTokenTransferFeeConfigUpdates( - tokenTransferFeeConfigArgs, new EVM2EVMMultiOnRamp.TokenTransferFeeConfigRemoveArgs[](0) + s_priceRegistry.applyTokenTransferFeeConfigUpdates( + tokenTransferFeeConfigArgs, new PriceRegistry.TokenTransferFeeConfigRemoveArgs[](0) ); vm.startPrank(address(s_sourceRouter)); @@ -847,7 +503,7 @@ contract EVM2EVMMultiOnRamp_forwardFromRouter is EVM2EVMMultiOnRampSetup { newPool.setSourceTokenData(new bytes(uint32(Pool.CCIP_LOCK_OR_BURN_V1_RET_BYTES) + 32 + 1)); vm.startPrank(address(s_sourceRouter)); - vm.expectRevert(abi.encodeWithSelector(EVM2EVMMultiOnRamp.SourceTokenDataTooLarge.selector, sourceETH)); + vm.expectRevert(abi.encodeWithSelector(PriceRegistry.SourceTokenDataTooLarge.selector, sourceETH)); s_onRamp.forwardFromRouter(DEST_CHAIN_SELECTOR, message, 0, OWNER); } @@ -885,229 +541,6 @@ contract EVM2EVMMultiOnRamp_forwardFromRouter is EVM2EVMMultiOnRampSetup { vm.expectRevert(abi.encodeWithSelector(Internal.InvalidEVMAddress.selector, nonEvmAddress)); s_onRamp.forwardFromRouter(DEST_CHAIN_SELECTOR, message, 0, OWNER); } - - function test_forwardFromRouter_UnsupportedToken_Revert() public { - Client.EVM2AnyMessage memory message = _generateEmptyMessage(); - message.tokenAmounts = new Client.EVMTokenAmount[](1); - message.tokenAmounts[0].amount = 1; - message.tokenAmounts[0].token = address(1); - - vm.expectRevert(abi.encodeWithSelector(EVM2EVMMultiOnRamp.UnsupportedToken.selector, message.tokenAmounts[0].token)); - - s_onRamp.forwardFromRouter(DEST_CHAIN_SELECTOR, message, 0, OWNER); - } - - function test_EnforceOutOfOrder_Revert() public { - // Update dynamic config to enforce allowOutOfOrderExecution = true. - vm.stopPrank(); - vm.startPrank(OWNER); - - EVM2EVMMultiOnRamp.DestChainConfigArgs[] memory destChainConfigArgs = _generateDestChainConfigArgs(); - destChainConfigArgs[0].dynamicConfig.enforceOutOfOrder = true; - s_onRamp.applyDestChainConfigUpdates(destChainConfigArgs); - vm.stopPrank(); - - vm.startPrank(address(s_sourceRouter)); - Client.EVM2AnyMessage memory message = _generateEmptyMessage(); - // Empty extraArgs to should revert since it enforceOutOfOrder is true. - message.extraArgs = ""; - uint256 feeAmount = 1234567890; - IERC20(s_sourceFeeToken).transferFrom(OWNER, address(s_onRamp), feeAmount); - - vm.expectRevert(EVM2EVMMultiOnRamp.ExtraArgOutOfOrderExecutionMustBeTrue.selector); - s_onRamp.forwardFromRouter(DEST_CHAIN_SELECTOR, message, feeAmount, OWNER); - } -} - -contract EVM2EVMMultiOnRamp_getFeeSetup is EVM2EVMMultiOnRampSetup { - uint224 internal s_feeTokenPrice; - uint224 internal s_wrappedTokenPrice; - uint224 internal s_customTokenPrice; - - address internal s_selfServeTokenDefaultPricing = makeAddr("self-serve-token-default-pricing"); - - function setUp() public virtual override { - super.setUp(); - - // Add additional pool addresses for test tokens to mark them as supported - s_tokenAdminRegistry.proposeAdministrator(s_sourceRouter.getWrappedNative(), OWNER); - s_tokenAdminRegistry.acceptAdminRole(s_sourceRouter.getWrappedNative()); - s_tokenAdminRegistry.proposeAdministrator(CUSTOM_TOKEN, OWNER); - s_tokenAdminRegistry.acceptAdminRole(CUSTOM_TOKEN); - - LockReleaseTokenPool wrappedNativePool = new LockReleaseTokenPool( - IERC20(s_sourceRouter.getWrappedNative()), new address[](0), address(s_mockRMN), true, address(s_sourceRouter) - ); - - TokenPool.ChainUpdate[] memory wrappedNativeChainUpdate = new TokenPool.ChainUpdate[](1); - wrappedNativeChainUpdate[0] = TokenPool.ChainUpdate({ - remoteChainSelector: DEST_CHAIN_SELECTOR, - remotePoolAddress: abi.encode(s_destTokenPool), - remoteTokenAddress: abi.encode(s_destToken), - allowed: true, - outboundRateLimiterConfig: getOutboundRateLimiterConfig(), - inboundRateLimiterConfig: getInboundRateLimiterConfig() - }); - wrappedNativePool.applyChainUpdates(wrappedNativeChainUpdate); - s_tokenAdminRegistry.setPool(s_sourceRouter.getWrappedNative(), address(wrappedNativePool)); - - LockReleaseTokenPool customPool = new LockReleaseTokenPool( - IERC20(CUSTOM_TOKEN), new address[](0), address(s_mockRMN), true, address(s_sourceRouter) - ); - TokenPool.ChainUpdate[] memory customChainUpdate = new TokenPool.ChainUpdate[](1); - customChainUpdate[0] = TokenPool.ChainUpdate({ - remoteChainSelector: DEST_CHAIN_SELECTOR, - remotePoolAddress: abi.encode(s_destTokenPool), - remoteTokenAddress: abi.encode(s_destToken), - allowed: true, - outboundRateLimiterConfig: getOutboundRateLimiterConfig(), - inboundRateLimiterConfig: getInboundRateLimiterConfig() - }); - customPool.applyChainUpdates(customChainUpdate); - s_tokenAdminRegistry.setPool(CUSTOM_TOKEN, address(customPool)); - - s_feeTokenPrice = s_sourceTokenPrices[0]; - s_wrappedTokenPrice = s_sourceTokenPrices[2]; - s_customTokenPrice = CUSTOM_TOKEN_PRICE; - - // Ensure the self-serve token is set up on the admin registry - vm.mockCall( - address(s_tokenAdminRegistry), - abi.encodeWithSelector(ITokenAdminRegistry.getPool.selector, s_selfServeTokenDefaultPricing), - abi.encode(makeAddr("self-serve-pool")) - ); - } - - function calcUSDValueFromTokenAmount(uint224 tokenPrice, uint256 tokenAmount) internal pure returns (uint256) { - return (tokenPrice * tokenAmount) / 1e18; - } - - function applyBpsRatio(uint256 tokenAmount, uint16 ratio) internal pure returns (uint256) { - return (tokenAmount * ratio) / 1e5; - } - - function configUSDCentToWei(uint256 usdCent) internal pure returns (uint256) { - return usdCent * 1e16; - } -} - -contract EVM2EVMMultiOnRamp_getDataAvailabilityCost is EVM2EVMMultiOnRamp_getFeeSetup { - function test_EmptyMessageCalculatesDataAvailabilityCost_Success() public { - uint256 dataAvailabilityCostUSD = - s_onRamp.getDataAvailabilityCost(DEST_CHAIN_SELECTOR, USD_PER_DATA_AVAILABILITY_GAS, 0, 0, 0); - - EVM2EVMMultiOnRamp.DestChainDynamicConfig memory destChainDynamicConfig = - s_onRamp.getDestChainConfig(DEST_CHAIN_SELECTOR).dynamicConfig; - - uint256 dataAvailabilityGas = destChainDynamicConfig.destDataAvailabilityOverheadGas - + destChainDynamicConfig.destGasPerDataAvailabilityByte * Internal.ANY_2_EVM_MESSAGE_FIXED_BYTES; - uint256 expectedDataAvailabilityCostUSD = USD_PER_DATA_AVAILABILITY_GAS * dataAvailabilityGas - * destChainDynamicConfig.destDataAvailabilityMultiplierBps * 1e14; - - assertEq(expectedDataAvailabilityCostUSD, dataAvailabilityCostUSD); - - // Test that the cost is destnation chain specific - EVM2EVMMultiOnRamp.DestChainConfigArgs[] memory destChainConfigArgs = _generateDestChainConfigArgs(); - destChainConfigArgs[0].destChainSelector = DEST_CHAIN_SELECTOR + 1; - destChainConfigArgs[0].dynamicConfig.destDataAvailabilityOverheadGas = - destChainDynamicConfig.destDataAvailabilityOverheadGas * 2; - destChainConfigArgs[0].dynamicConfig.destGasPerDataAvailabilityByte = - destChainDynamicConfig.destGasPerDataAvailabilityByte * 2; - destChainConfigArgs[0].dynamicConfig.destDataAvailabilityMultiplierBps = - destChainDynamicConfig.destDataAvailabilityMultiplierBps * 2; - s_onRamp.applyDestChainConfigUpdates(destChainConfigArgs); - - destChainDynamicConfig = s_onRamp.getDestChainConfig(DEST_CHAIN_SELECTOR + 1).dynamicConfig; - uint256 dataAvailabilityCostUSD2 = - s_onRamp.getDataAvailabilityCost(DEST_CHAIN_SELECTOR + 1, USD_PER_DATA_AVAILABILITY_GAS, 0, 0, 0); - dataAvailabilityGas = destChainDynamicConfig.destDataAvailabilityOverheadGas - + destChainDynamicConfig.destGasPerDataAvailabilityByte * Internal.ANY_2_EVM_MESSAGE_FIXED_BYTES; - expectedDataAvailabilityCostUSD = USD_PER_DATA_AVAILABILITY_GAS * dataAvailabilityGas - * destChainDynamicConfig.destDataAvailabilityMultiplierBps * 1e14; - - assertEq(expectedDataAvailabilityCostUSD, dataAvailabilityCostUSD2); - assertFalse(dataAvailabilityCostUSD == dataAvailabilityCostUSD2); - } - - function test_SimpleMessageCalculatesDataAvailabilityCost_Success() public view { - uint256 dataAvailabilityCostUSD = - s_onRamp.getDataAvailabilityCost(DEST_CHAIN_SELECTOR, USD_PER_DATA_AVAILABILITY_GAS, 100, 5, 50); - - EVM2EVMMultiOnRamp.DestChainDynamicConfig memory destChainDynamicConfig = - s_onRamp.getDestChainConfig(DEST_CHAIN_SELECTOR).dynamicConfig; - - uint256 dataAvailabilityLengthBytes = - Internal.ANY_2_EVM_MESSAGE_FIXED_BYTES + 100 + (5 * Internal.ANY_2_EVM_MESSAGE_FIXED_BYTES_PER_TOKEN) + 50; - uint256 dataAvailabilityGas = destChainDynamicConfig.destDataAvailabilityOverheadGas - + destChainDynamicConfig.destGasPerDataAvailabilityByte * dataAvailabilityLengthBytes; - uint256 expectedDataAvailabilityCostUSD = USD_PER_DATA_AVAILABILITY_GAS * dataAvailabilityGas - * destChainDynamicConfig.destDataAvailabilityMultiplierBps * 1e14; - - assertEq(expectedDataAvailabilityCostUSD, dataAvailabilityCostUSD); - } - - function test_SimpleMessageCalculatesDataAvailabilityCostUnsupportedDestChainSelector_Success() public view { - uint256 dataAvailabilityCostUSD = s_onRamp.getDataAvailabilityCost(0, USD_PER_DATA_AVAILABILITY_GAS, 100, 5, 50); - - assertEq(dataAvailabilityCostUSD, 0); - } - - function test_Fuzz_ZeroDataAvailabilityGasPriceAlwaysCalculatesZeroDataAvailabilityCost_Success( - uint64 messageDataLength, - uint32 numberOfTokens, - uint32 tokenTransferBytesOverhead - ) public view { - uint256 dataAvailabilityCostUSD = s_onRamp.getDataAvailabilityCost( - DEST_CHAIN_SELECTOR, 0, messageDataLength, numberOfTokens, tokenTransferBytesOverhead - ); - - assertEq(0, dataAvailabilityCostUSD); - } - - function test_Fuzz_CalculateDataAvailabilityCost_Success( - uint64 destChainSelector, - uint32 destDataAvailabilityOverheadGas, - uint16 destGasPerDataAvailabilityByte, - uint16 destDataAvailabilityMultiplierBps, - uint112 dataAvailabilityGasPrice, - uint64 messageDataLength, - uint32 numberOfTokens, - uint32 tokenTransferBytesOverhead - ) public { - vm.assume(destChainSelector != 0); - EVM2EVMMultiOnRamp.DestChainConfigArgs[] memory destChainConfigArgs = - new EVM2EVMMultiOnRamp.DestChainConfigArgs[](1); - EVM2EVMMultiOnRamp.DestChainConfig memory destChainConfig = s_onRamp.getDestChainConfig(destChainSelector); - destChainConfigArgs[0] = EVM2EVMMultiOnRamp.DestChainConfigArgs({ - destChainSelector: destChainSelector, - dynamicConfig: destChainConfig.dynamicConfig - }); - destChainConfigArgs[0].dynamicConfig.destDataAvailabilityOverheadGas = destDataAvailabilityOverheadGas; - destChainConfigArgs[0].dynamicConfig.destGasPerDataAvailabilityByte = destGasPerDataAvailabilityByte; - destChainConfigArgs[0].dynamicConfig.destDataAvailabilityMultiplierBps = destDataAvailabilityMultiplierBps; - destChainConfigArgs[0].dynamicConfig.defaultTxGasLimit = GAS_LIMIT; - destChainConfigArgs[0].dynamicConfig.chainFamilySelector = Internal.CHAIN_FAMILY_SELECTOR_EVM; - - s_onRamp.applyDestChainConfigUpdates(destChainConfigArgs); - - uint256 dataAvailabilityCostUSD = s_onRamp.getDataAvailabilityCost( - destChainConfigArgs[0].destChainSelector, - dataAvailabilityGasPrice, - messageDataLength, - numberOfTokens, - tokenTransferBytesOverhead - ); - - uint256 dataAvailabilityLengthBytes = Internal.ANY_2_EVM_MESSAGE_FIXED_BYTES + messageDataLength - + (numberOfTokens * Internal.ANY_2_EVM_MESSAGE_FIXED_BYTES_PER_TOKEN) + tokenTransferBytesOverhead; - - uint256 dataAvailabilityGas = - destDataAvailabilityOverheadGas + destGasPerDataAvailabilityByte * dataAvailabilityLengthBytes; - uint256 expectedDataAvailabilityCostUSD = - dataAvailabilityGasPrice * dataAvailabilityGas * destDataAvailabilityMultiplierBps * 1e14; - - assertEq(expectedDataAvailabilityCostUSD, dataAvailabilityCostUSD); - } } contract EVM2EVMMultiOnRamp_getSupportedTokens is EVM2EVMMultiOnRampSetup { @@ -1117,7 +550,7 @@ contract EVM2EVMMultiOnRamp_getSupportedTokens is EVM2EVMMultiOnRampSetup { } } -contract EVM2EVMMultiOnRamp_getFee is EVM2EVMMultiOnRamp_getFeeSetup { +contract EVM2EVMMultiOnRamp_getFee is EVM2EVMMultiOnRampSetup { using USDPriceWith18Decimals for uint224; function test_EmptyMessage_Success() public view { @@ -1127,81 +560,11 @@ contract EVM2EVMMultiOnRamp_getFee is EVM2EVMMultiOnRamp_getFeeSetup { for (uint256 i = 0; i < feeTokenPrices.length; ++i) { Client.EVM2AnyMessage memory message = _generateEmptyMessage(); message.feeToken = testTokens[i]; - uint64 premiumMultiplierWeiPerEth = s_onRamp.getPremiumMultiplierWeiPerEth(message.feeToken); - EVM2EVMMultiOnRamp.DestChainDynamicConfig memory destChainDynamicConfig = - s_onRamp.getDestChainConfig(DEST_CHAIN_SELECTOR).dynamicConfig; uint256 feeAmount = s_onRamp.getFee(DEST_CHAIN_SELECTOR, message); + uint256 expectedFeeAmount = s_priceRegistry.getValidatedFee(DEST_CHAIN_SELECTOR, message); - uint256 gasUsed = GAS_LIMIT + DEST_GAS_OVERHEAD; - uint256 gasFeeUSD = (gasUsed * destChainDynamicConfig.gasMultiplierWeiPerEth * USD_PER_GAS); - uint256 messageFeeUSD = - (configUSDCentToWei(destChainDynamicConfig.networkFeeUSDCents) * premiumMultiplierWeiPerEth); - uint256 dataAvailabilityFeeUSD = s_onRamp.getDataAvailabilityCost( - DEST_CHAIN_SELECTOR, USD_PER_DATA_AVAILABILITY_GAS, message.data.length, message.tokenAmounts.length, 0 - ); - - uint256 totalPriceInFeeToken = (gasFeeUSD + messageFeeUSD + dataAvailabilityFeeUSD) / feeTokenPrices[i]; - assertEq(totalPriceInFeeToken, feeAmount); - } - } - - function test_ZeroDataAvailabilityMultiplier_Success() public { - EVM2EVMMultiOnRamp.DestChainConfigArgs[] memory destChainConfigArgs = - new EVM2EVMMultiOnRamp.DestChainConfigArgs[](1); - EVM2EVMMultiOnRamp.DestChainConfig memory destChainConfig = s_onRamp.getDestChainConfig(DEST_CHAIN_SELECTOR); - destChainConfigArgs[0] = EVM2EVMMultiOnRamp.DestChainConfigArgs({ - destChainSelector: DEST_CHAIN_SELECTOR, - dynamicConfig: destChainConfig.dynamicConfig - }); - destChainConfigArgs[0].dynamicConfig.destDataAvailabilityMultiplierBps = 0; - s_onRamp.applyDestChainConfigUpdates(destChainConfigArgs); - - Client.EVM2AnyMessage memory message = _generateEmptyMessage(); - uint64 premiumMultiplierWeiPerEth = s_onRamp.getPremiumMultiplierWeiPerEth(message.feeToken); - EVM2EVMMultiOnRamp.DestChainDynamicConfig memory destChainDynamicConfig = - s_onRamp.getDestChainConfig(DEST_CHAIN_SELECTOR).dynamicConfig; - - uint256 feeAmount = s_onRamp.getFee(DEST_CHAIN_SELECTOR, message); - - uint256 gasUsed = GAS_LIMIT + DEST_GAS_OVERHEAD; - uint256 gasFeeUSD = (gasUsed * destChainDynamicConfig.gasMultiplierWeiPerEth * USD_PER_GAS); - uint256 messageFeeUSD = (configUSDCentToWei(destChainDynamicConfig.networkFeeUSDCents) * premiumMultiplierWeiPerEth); - - uint256 totalPriceInFeeToken = (gasFeeUSD + messageFeeUSD) / s_feeTokenPrice; - assertEq(totalPriceInFeeToken, feeAmount); - } - - function test_HighGasMessage_Success() public view { - address[2] memory testTokens = [s_sourceFeeToken, s_sourceRouter.getWrappedNative()]; - uint224[2] memory feeTokenPrices = [s_feeTokenPrice, s_wrappedTokenPrice]; - - uint256 customGasLimit = MAX_GAS_LIMIT; - uint256 customDataSize = MAX_DATA_SIZE; - for (uint256 i = 0; i < feeTokenPrices.length; ++i) { - Client.EVM2AnyMessage memory message = Client.EVM2AnyMessage({ - receiver: abi.encode(OWNER), - data: new bytes(customDataSize), - tokenAmounts: new Client.EVMTokenAmount[](0), - feeToken: testTokens[i], - extraArgs: Client._argsToBytes(Client.EVMExtraArgsV1({gasLimit: customGasLimit})) - }); - - uint64 premiumMultiplierWeiPerEth = s_onRamp.getPremiumMultiplierWeiPerEth(message.feeToken); - EVM2EVMMultiOnRamp.DestChainDynamicConfig memory destChainDynamicConfig = - s_onRamp.getDestChainConfig(DEST_CHAIN_SELECTOR).dynamicConfig; - - uint256 feeAmount = s_onRamp.getFee(DEST_CHAIN_SELECTOR, message); - uint256 gasUsed = customGasLimit + DEST_GAS_OVERHEAD + customDataSize * DEST_GAS_PER_PAYLOAD_BYTE; - uint256 gasFeeUSD = (gasUsed * destChainDynamicConfig.gasMultiplierWeiPerEth * USD_PER_GAS); - uint256 messageFeeUSD = - (configUSDCentToWei(destChainDynamicConfig.networkFeeUSDCents) * premiumMultiplierWeiPerEth); - uint256 dataAvailabilityFeeUSD = s_onRamp.getDataAvailabilityCost( - DEST_CHAIN_SELECTOR, USD_PER_DATA_AVAILABILITY_GAS, message.data.length, message.tokenAmounts.length, 0 - ); - - uint256 totalPriceInFeeToken = (gasFeeUSD + messageFeeUSD + dataAvailabilityFeeUSD) / feeTokenPrices[i]; - assertEq(totalPriceInFeeToken, feeAmount); + assertEq(expectedFeeAmount, feeAmount); } } @@ -1213,409 +576,62 @@ contract EVM2EVMMultiOnRamp_getFee is EVM2EVMMultiOnRamp_getFeeSetup { for (uint256 i = 0; i < feeTokenPrices.length; ++i) { Client.EVM2AnyMessage memory message = _generateSingleTokenMessage(s_sourceFeeToken, tokenAmount); message.feeToken = testTokens[i]; - EVM2EVMMultiOnRamp.DestChainDynamicConfig memory destChainDynamicConfig = - s_onRamp.getDestChainConfig(DEST_CHAIN_SELECTOR).dynamicConfig; - uint32 destBytesOverhead = - s_onRamp.getTokenTransferFeeConfig(DEST_CHAIN_SELECTOR, message.tokenAmounts[0].token).destBytesOverhead; - uint32 tokenBytesOverhead = - destBytesOverhead == 0 ? uint32(Pool.CCIP_LOCK_OR_BURN_V1_RET_BYTES) : destBytesOverhead; uint256 feeAmount = s_onRamp.getFee(DEST_CHAIN_SELECTOR, message); + uint256 expectedFeeAmount = s_priceRegistry.getValidatedFee(DEST_CHAIN_SELECTOR, message); - uint256 gasUsed = GAS_LIMIT + DEST_GAS_OVERHEAD - + s_onRamp.getTokenTransferFeeConfig(DEST_CHAIN_SELECTOR, message.tokenAmounts[0].token).destGasOverhead; - uint256 gasFeeUSD = (gasUsed * destChainDynamicConfig.gasMultiplierWeiPerEth * USD_PER_GAS); - (uint256 transferFeeUSD,,) = - s_onRamp.getTokenTransferCost(DEST_CHAIN_SELECTOR, message.feeToken, feeTokenPrices[i], message.tokenAmounts); - uint256 messageFeeUSD = (transferFeeUSD * s_onRamp.getPremiumMultiplierWeiPerEth(message.feeToken)); - uint256 dataAvailabilityFeeUSD = s_onRamp.getDataAvailabilityCost( - DEST_CHAIN_SELECTOR, - USD_PER_DATA_AVAILABILITY_GAS, - message.data.length, - message.tokenAmounts.length, - tokenBytesOverhead - ); - - uint256 totalPriceInFeeToken = (gasFeeUSD + messageFeeUSD + dataAvailabilityFeeUSD) / feeTokenPrices[i]; - assertEq(totalPriceInFeeToken, feeAmount); - } - } - - function test_MessageWithDataAndTokenTransfer_Success() public view { - address[2] memory testTokens = [s_sourceFeeToken, s_sourceRouter.getWrappedNative()]; - uint224[2] memory feeTokenPrices = [s_feeTokenPrice, s_wrappedTokenPrice]; - - uint256 customGasLimit = 1_000_000; - for (uint256 i = 0; i < feeTokenPrices.length; ++i) { - Client.EVM2AnyMessage memory message = Client.EVM2AnyMessage({ - receiver: abi.encode(OWNER), - data: "", - tokenAmounts: new Client.EVMTokenAmount[](2), - feeToken: testTokens[i], - extraArgs: Client._argsToBytes(Client.EVMExtraArgsV1({gasLimit: customGasLimit})) - }); - uint64 premiumMultiplierWeiPerEth = s_onRamp.getPremiumMultiplierWeiPerEth(message.feeToken); - EVM2EVMMultiOnRamp.DestChainDynamicConfig memory destChainDynamicConfig = - s_onRamp.getDestChainConfig(DEST_CHAIN_SELECTOR).dynamicConfig; - - message.tokenAmounts[0] = Client.EVMTokenAmount({token: s_sourceFeeToken, amount: 10000e18}); // feeTokenAmount - message.tokenAmounts[1] = Client.EVMTokenAmount({token: CUSTOM_TOKEN, amount: 200000e18}); // customTokenAmount - message.data = "random bits and bytes that should be factored into the cost of the message"; - - uint32 tokenGasOverhead = 0; - uint32 tokenBytesOverhead = 0; - for (uint256 j = 0; j < message.tokenAmounts.length; ++j) { - tokenGasOverhead += - s_onRamp.getTokenTransferFeeConfig(DEST_CHAIN_SELECTOR, message.tokenAmounts[j].token).destGasOverhead; - uint32 destBytesOverhead = - s_onRamp.getTokenTransferFeeConfig(DEST_CHAIN_SELECTOR, message.tokenAmounts[j].token).destBytesOverhead; - tokenBytesOverhead += destBytesOverhead == 0 ? uint32(Pool.CCIP_LOCK_OR_BURN_V1_RET_BYTES) : destBytesOverhead; - } - - uint256 gasUsed = - customGasLimit + DEST_GAS_OVERHEAD + message.data.length * DEST_GAS_PER_PAYLOAD_BYTE + tokenGasOverhead; - uint256 gasFeeUSD = (gasUsed * destChainDynamicConfig.gasMultiplierWeiPerEth * USD_PER_GAS); - (uint256 transferFeeUSD,,) = - s_onRamp.getTokenTransferCost(DEST_CHAIN_SELECTOR, message.feeToken, feeTokenPrices[i], message.tokenAmounts); - uint256 messageFeeUSD = (transferFeeUSD * premiumMultiplierWeiPerEth); - uint256 dataAvailabilityFeeUSD = s_onRamp.getDataAvailabilityCost( - DEST_CHAIN_SELECTOR, - USD_PER_DATA_AVAILABILITY_GAS, - message.data.length, - message.tokenAmounts.length, - tokenBytesOverhead - ); - - uint256 totalPriceInFeeToken = (gasFeeUSD + messageFeeUSD + dataAvailabilityFeeUSD) / feeTokenPrices[i]; - assertEq(totalPriceInFeeToken, s_onRamp.getFee(DEST_CHAIN_SELECTOR, message)); + assertEq(expectedFeeAmount, feeAmount); } } // Reverts - function test_DestinationChainNotEnabled_Revert() public { - vm.expectRevert( - abi.encodeWithSelector(EVM2EVMMultiOnRamp.DestinationChainNotEnabled.selector, DEST_CHAIN_SELECTOR + 1) - ); - s_onRamp.getFee(DEST_CHAIN_SELECTOR + 1, _generateEmptyMessage()); + function test_Unhealthy_Revert() public { + s_mockRMN.setGlobalCursed(true); + vm.expectRevert(abi.encodeWithSelector(EVM2EVMMultiOnRamp.CursedByRMN.selector, DEST_CHAIN_SELECTOR)); + s_onRamp.getFee(DEST_CHAIN_SELECTOR, _generateEmptyMessage()); } - function test_NotAFeeToken_Revert() public { - address notAFeeToken = address(0x111111); - Client.EVM2AnyMessage memory message = _generateSingleTokenMessage(notAFeeToken, 1); - message.feeToken = notAFeeToken; - - vm.expectRevert(abi.encodeWithSelector(EVM2EVMMultiOnRamp.NotAFeeToken.selector, notAFeeToken)); + function test_EnforceOutOfOrder_Revert() public { + // Update dynamic config to enforce allowOutOfOrderExecution = true. + vm.stopPrank(); + vm.startPrank(OWNER); - s_onRamp.getFee(DEST_CHAIN_SELECTOR, message); - } + PriceRegistry.DestChainDynamicConfigArgs[] memory destChainConfigArgs = + _generatePriceRegistryDestChainDynamicConfigArgs(); + destChainConfigArgs[0].dynamicConfig.enforceOutOfOrder = true; + s_priceRegistry.applyDestChainConfigUpdates(destChainConfigArgs); + vm.stopPrank(); - function test_MessageTooLarge_Revert() public { Client.EVM2AnyMessage memory message = _generateEmptyMessage(); - message.data = new bytes(MAX_DATA_SIZE + 1); - vm.expectRevert( - abi.encodeWithSelector(EVM2EVMMultiOnRamp.MessageTooLarge.selector, MAX_DATA_SIZE, message.data.length) - ); - - s_onRamp.getFee(DEST_CHAIN_SELECTOR, message); - } + // Empty extraArgs to should revert since it enforceOutOfOrder is true. + message.extraArgs = ""; - function test_TooManyTokens_Revert() public { - Client.EVM2AnyMessage memory message = _generateEmptyMessage(); - uint256 tooMany = MAX_TOKENS_LENGTH + 1; - message.tokenAmounts = new Client.EVMTokenAmount[](tooMany); - vm.expectRevert(EVM2EVMMultiOnRamp.UnsupportedNumberOfTokens.selector); + vm.expectRevert(PriceRegistry.ExtraArgOutOfOrderExecutionMustBeTrue.selector); s_onRamp.getFee(DEST_CHAIN_SELECTOR, message); } - // Asserts gasLimit must be <=maxGasLimit - function test_MessageGasLimitTooHigh_Revert() public { - Client.EVM2AnyMessage memory message = _generateEmptyMessage(); - message.extraArgs = Client._argsToBytes(Client.EVMExtraArgsV1({gasLimit: MAX_GAS_LIMIT + 1})); - vm.expectRevert(abi.encodeWithSelector(EVM2EVMMultiOnRamp.MessageGasLimitTooHigh.selector)); - s_onRamp.getFee(DEST_CHAIN_SELECTOR, message); - } -} + function test_Fuzz_EnforceOutOfOrder(bool enforce, bool allowOutOfOrderExecution) public { + // Update dynamic config to enforce allowOutOfOrderExecution = defaultVal. + vm.stopPrank(); + vm.startPrank(OWNER); -contract EVM2EVMMultiOnRamp_getTokenTransferCost is EVM2EVMMultiOnRamp_getFeeSetup { - using USDPriceWith18Decimals for uint224; + PriceRegistry.DestChainDynamicConfigArgs[] memory destChainConfigArgs = + _generatePriceRegistryDestChainDynamicConfigArgs(); + destChainConfigArgs[0].dynamicConfig.enforceOutOfOrder = enforce; + s_priceRegistry.applyDestChainConfigUpdates(destChainConfigArgs); - function test_NoTokenTransferChargesZeroFee_Success() public view { Client.EVM2AnyMessage memory message = _generateEmptyMessage(); - (uint256 feeUSDWei, uint32 destGasOverhead, uint32 destBytesOverhead) = - s_onRamp.getTokenTransferCost(DEST_CHAIN_SELECTOR, message.feeToken, s_feeTokenPrice, message.tokenAmounts); - - assertEq(0, feeUSDWei); - assertEq(0, destGasOverhead); - assertEq(0, destBytesOverhead); - } - - function test_getTokenTransferCost_selfServeUsesDefaults_Success() public view { - Client.EVM2AnyMessage memory message = _generateSingleTokenMessage(s_selfServeTokenDefaultPricing, 1000); - - // Get config to assert it isn't set - EVM2EVMMultiOnRamp.TokenTransferFeeConfig memory transferFeeConfig = - s_onRamp.getTokenTransferFeeConfig(DEST_CHAIN_SELECTOR, message.tokenAmounts[0].token); - - assertFalse(transferFeeConfig.isEnabled); - - (uint256 feeUSDWei, uint32 destGasOverhead, uint32 destBytesOverhead) = - s_onRamp.getTokenTransferCost(DEST_CHAIN_SELECTOR, message.feeToken, s_feeTokenPrice, message.tokenAmounts); - - // Assert that the default values are used - assertEq(uint256(DEFAULT_TOKEN_FEE_USD_CENTS) * 1e16, feeUSDWei); - assertEq(DEFAULT_TOKEN_DEST_GAS_OVERHEAD, destGasOverhead); - assertEq(DEFAULT_TOKEN_BYTES_OVERHEAD, destBytesOverhead); - } - - function test_SmallTokenTransferChargesMinFeeAndGas_Success() public view { - Client.EVM2AnyMessage memory message = _generateSingleTokenMessage(s_sourceFeeToken, 1000); - EVM2EVMMultiOnRamp.TokenTransferFeeConfig memory transferFeeConfig = - s_onRamp.getTokenTransferFeeConfig(DEST_CHAIN_SELECTOR, message.tokenAmounts[0].token); - - (uint256 feeUSDWei, uint32 destGasOverhead, uint32 destBytesOverhead) = - s_onRamp.getTokenTransferCost(DEST_CHAIN_SELECTOR, message.feeToken, s_feeTokenPrice, message.tokenAmounts); - - assertEq(configUSDCentToWei(transferFeeConfig.minFeeUSDCents), feeUSDWei); - assertEq(transferFeeConfig.destGasOverhead, destGasOverhead); - assertEq(transferFeeConfig.destBytesOverhead, destBytesOverhead); - } - - function test_ZeroAmountTokenTransferChargesMinFeeAndGas_Success() public view { - Client.EVM2AnyMessage memory message = _generateSingleTokenMessage(s_sourceFeeToken, 0); - EVM2EVMMultiOnRamp.TokenTransferFeeConfig memory transferFeeConfig = - s_onRamp.getTokenTransferFeeConfig(DEST_CHAIN_SELECTOR, message.tokenAmounts[0].token); - - (uint256 feeUSDWei, uint32 destGasOverhead, uint32 destBytesOverhead) = - s_onRamp.getTokenTransferCost(DEST_CHAIN_SELECTOR, message.feeToken, s_feeTokenPrice, message.tokenAmounts); - - assertEq(configUSDCentToWei(transferFeeConfig.minFeeUSDCents), feeUSDWei); - assertEq(transferFeeConfig.destGasOverhead, destGasOverhead); - assertEq(transferFeeConfig.destBytesOverhead, destBytesOverhead); - } - - function test_LargeTokenTransferChargesMaxFeeAndGas_Success() public view { - Client.EVM2AnyMessage memory message = _generateSingleTokenMessage(s_sourceFeeToken, 1e36); - EVM2EVMMultiOnRamp.TokenTransferFeeConfig memory transferFeeConfig = - s_onRamp.getTokenTransferFeeConfig(DEST_CHAIN_SELECTOR, message.tokenAmounts[0].token); - - (uint256 feeUSDWei, uint32 destGasOverhead, uint32 destBytesOverhead) = - s_onRamp.getTokenTransferCost(DEST_CHAIN_SELECTOR, message.feeToken, s_feeTokenPrice, message.tokenAmounts); - - assertEq(configUSDCentToWei(transferFeeConfig.maxFeeUSDCents), feeUSDWei); - assertEq(transferFeeConfig.destGasOverhead, destGasOverhead); - assertEq(transferFeeConfig.destBytesOverhead, destBytesOverhead); - } - - function test_FeeTokenBpsFee_Success() public view { - uint256 tokenAmount = 10000e18; - - Client.EVM2AnyMessage memory message = _generateSingleTokenMessage(s_sourceFeeToken, tokenAmount); - EVM2EVMMultiOnRamp.TokenTransferFeeConfig memory transferFeeConfig = - s_onRamp.getTokenTransferFeeConfig(DEST_CHAIN_SELECTOR, message.tokenAmounts[0].token); - - (uint256 feeUSDWei, uint32 destGasOverhead, uint32 destBytesOverhead) = - s_onRamp.getTokenTransferCost(DEST_CHAIN_SELECTOR, message.feeToken, s_feeTokenPrice, message.tokenAmounts); - - uint256 usdWei = calcUSDValueFromTokenAmount(s_feeTokenPrice, tokenAmount); - uint256 bpsUSDWei = - applyBpsRatio(usdWei, s_tokenTransferFeeConfigArgs[0].tokenTransferFeeConfigs[0].tokenTransferFeeConfig.deciBps); - - assertEq(bpsUSDWei, feeUSDWei); - assertEq(transferFeeConfig.destGasOverhead, destGasOverhead); - assertEq(transferFeeConfig.destBytesOverhead, destBytesOverhead); - } - - function test_WETHTokenBpsFee_Success() public view { - uint256 tokenAmount = 100e18; - - Client.EVM2AnyMessage memory message = Client.EVM2AnyMessage({ - receiver: abi.encode(OWNER), - data: "", - tokenAmounts: new Client.EVMTokenAmount[](1), - feeToken: s_sourceRouter.getWrappedNative(), - extraArgs: Client._argsToBytes(Client.EVMExtraArgsV1({gasLimit: GAS_LIMIT})) - }); - message.tokenAmounts[0] = Client.EVMTokenAmount({token: s_sourceRouter.getWrappedNative(), amount: tokenAmount}); - - EVM2EVMMultiOnRamp.TokenTransferFeeConfig memory transferFeeConfig = - s_onRamp.getTokenTransferFeeConfig(DEST_CHAIN_SELECTOR, message.tokenAmounts[0].token); - - (uint256 feeUSDWei, uint32 destGasOverhead, uint32 destBytesOverhead) = - s_onRamp.getTokenTransferCost(DEST_CHAIN_SELECTOR, message.feeToken, s_wrappedTokenPrice, message.tokenAmounts); - - uint256 usdWei = calcUSDValueFromTokenAmount(s_wrappedTokenPrice, tokenAmount); - uint256 bpsUSDWei = - applyBpsRatio(usdWei, s_tokenTransferFeeConfigArgs[0].tokenTransferFeeConfigs[1].tokenTransferFeeConfig.deciBps); - - assertEq(bpsUSDWei, feeUSDWei); - assertEq(transferFeeConfig.destGasOverhead, destGasOverhead); - assertEq(transferFeeConfig.destBytesOverhead, destBytesOverhead); - } - - function test_CustomTokenBpsFee_Success() public view { - uint256 tokenAmount = 200000e18; - - Client.EVM2AnyMessage memory message = Client.EVM2AnyMessage({ - receiver: abi.encode(OWNER), - data: "", - tokenAmounts: new Client.EVMTokenAmount[](1), - feeToken: s_sourceFeeToken, - extraArgs: Client._argsToBytes(Client.EVMExtraArgsV1({gasLimit: GAS_LIMIT})) - }); - message.tokenAmounts[0] = Client.EVMTokenAmount({token: CUSTOM_TOKEN, amount: tokenAmount}); - - EVM2EVMMultiOnRamp.TokenTransferFeeConfig memory transferFeeConfig = - s_onRamp.getTokenTransferFeeConfig(DEST_CHAIN_SELECTOR, message.tokenAmounts[0].token); - - (uint256 feeUSDWei, uint32 destGasOverhead, uint32 destBytesOverhead) = - s_onRamp.getTokenTransferCost(DEST_CHAIN_SELECTOR, message.feeToken, s_feeTokenPrice, message.tokenAmounts); - - uint256 usdWei = calcUSDValueFromTokenAmount(s_customTokenPrice, tokenAmount); - uint256 bpsUSDWei = - applyBpsRatio(usdWei, s_tokenTransferFeeConfigArgs[0].tokenTransferFeeConfigs[2].tokenTransferFeeConfig.deciBps); - - assertEq(bpsUSDWei, feeUSDWei); - assertEq(transferFeeConfig.destGasOverhead, destGasOverhead); - assertEq(transferFeeConfig.destBytesOverhead, destBytesOverhead); - } - - function test_ZeroFeeConfigChargesMinFee_Success() public { - EVM2EVMMultiOnRamp.TokenTransferFeeConfigArgs[] memory tokenTransferFeeConfigArgs = - _generateTokenTransferFeeConfigArgs(1, 1); - tokenTransferFeeConfigArgs[0].destChainSelector = DEST_CHAIN_SELECTOR; - tokenTransferFeeConfigArgs[0].tokenTransferFeeConfigs[0].token = s_sourceFeeToken; - tokenTransferFeeConfigArgs[0].tokenTransferFeeConfigs[0].tokenTransferFeeConfig = EVM2EVMMultiOnRamp - .TokenTransferFeeConfig({ - minFeeUSDCents: 1, - maxFeeUSDCents: 0, - deciBps: 0, - destGasOverhead: 0, - destBytesOverhead: uint32(Pool.CCIP_LOCK_OR_BURN_V1_RET_BYTES), - isEnabled: true - }); - s_onRamp.applyTokenTransferFeeConfigUpdates( - tokenTransferFeeConfigArgs, new EVM2EVMMultiOnRamp.TokenTransferFeeConfigRemoveArgs[](0) - ); - - Client.EVM2AnyMessage memory message = _generateSingleTokenMessage(s_sourceFeeToken, 1e36); - (uint256 feeUSDWei, uint32 destGasOverhead, uint32 destBytesOverhead) = - s_onRamp.getTokenTransferCost(DEST_CHAIN_SELECTOR, message.feeToken, s_feeTokenPrice, message.tokenAmounts); - - // if token charges 0 bps, it should cost minFee to transfer - assertEq( - configUSDCentToWei(tokenTransferFeeConfigArgs[0].tokenTransferFeeConfigs[0].tokenTransferFeeConfig.minFeeUSDCents), - feeUSDWei + message.extraArgs = abi.encodeWithSelector( + Client.EVM_EXTRA_ARGS_V2_TAG, + Client.EVMExtraArgsV2({gasLimit: GAS_LIMIT * 2, allowOutOfOrderExecution: allowOutOfOrderExecution}) ); - assertEq(0, destGasOverhead); - assertEq(Pool.CCIP_LOCK_OR_BURN_V1_RET_BYTES, destBytesOverhead); - } - - function test_Fuzz_TokenTransferFeeDuplicateTokens_Success(uint256 transfers, uint256 amount) public view { - // It shouldn't be possible to pay materially lower fees by splitting up the transfers. - // Note it is possible to pay higher fees since the minimum fees are added. - EVM2EVMMultiOnRamp.DestChainDynamicConfig memory dynamicConfig = - s_onRamp.getDestChainConfig(DEST_CHAIN_SELECTOR).dynamicConfig; - transfers = bound(transfers, 1, dynamicConfig.maxNumberOfTokensPerMsg); - // Cap amount to avoid overflow - amount = bound(amount, 0, 1e36); - Client.EVMTokenAmount[] memory multiple = new Client.EVMTokenAmount[](transfers); - for (uint256 i = 0; i < transfers; ++i) { - multiple[i] = Client.EVMTokenAmount({token: s_sourceTokens[0], amount: amount}); - } - Client.EVMTokenAmount[] memory single = new Client.EVMTokenAmount[](1); - single[0] = Client.EVMTokenAmount({token: s_sourceTokens[0], amount: amount * transfers}); - - address feeToken = s_sourceRouter.getWrappedNative(); - - (uint256 feeSingleUSDWei, uint32 gasOverheadSingle, uint32 bytesOverheadSingle) = - s_onRamp.getTokenTransferCost(DEST_CHAIN_SELECTOR, feeToken, s_wrappedTokenPrice, single); - (uint256 feeMultipleUSDWei, uint32 gasOverheadMultiple, uint32 bytesOverheadMultiple) = - s_onRamp.getTokenTransferCost(DEST_CHAIN_SELECTOR, feeToken, s_wrappedTokenPrice, multiple); - - // Note that there can be a rounding error once per split. - assertGe(feeMultipleUSDWei, (feeSingleUSDWei - dynamicConfig.maxNumberOfTokensPerMsg)); - assertEq(gasOverheadMultiple, gasOverheadSingle * transfers); - assertEq(bytesOverheadMultiple, bytesOverheadSingle * transfers); - } - - function test_MixedTokenTransferFee_Success() public view { - address[3] memory testTokens = [s_sourceFeeToken, s_sourceRouter.getWrappedNative(), CUSTOM_TOKEN]; - uint224[3] memory tokenPrices = [s_feeTokenPrice, s_wrappedTokenPrice, s_customTokenPrice]; - EVM2EVMMultiOnRamp.TokenTransferFeeConfig[3] memory tokenTransferFeeConfigs = [ - s_onRamp.getTokenTransferFeeConfig(DEST_CHAIN_SELECTOR, testTokens[0]), - s_onRamp.getTokenTransferFeeConfig(DEST_CHAIN_SELECTOR, testTokens[1]), - s_onRamp.getTokenTransferFeeConfig(DEST_CHAIN_SELECTOR, testTokens[2]) - ]; - - Client.EVM2AnyMessage memory message = Client.EVM2AnyMessage({ - receiver: abi.encode(OWNER), - data: "", - tokenAmounts: new Client.EVMTokenAmount[](3), - feeToken: s_sourceRouter.getWrappedNative(), - extraArgs: Client._argsToBytes(Client.EVMExtraArgsV1({gasLimit: GAS_LIMIT})) - }); - uint256 expectedTotalGas = 0; - uint256 expectedTotalBytes = 0; - - // Start with small token transfers, total bps fee is lower than min token transfer fee - for (uint256 i = 0; i < testTokens.length; ++i) { - message.tokenAmounts[i] = Client.EVMTokenAmount({token: testTokens[i], amount: 1e14}); - expectedTotalGas += s_onRamp.getTokenTransferFeeConfig(DEST_CHAIN_SELECTOR, testTokens[i]).destGasOverhead; - expectedTotalBytes += s_onRamp.getTokenTransferFeeConfig(DEST_CHAIN_SELECTOR, testTokens[i]).destBytesOverhead; - } - (uint256 feeUSDWei, uint32 destGasOverhead, uint32 destBytesOverhead) = - s_onRamp.getTokenTransferCost(DEST_CHAIN_SELECTOR, message.feeToken, s_wrappedTokenPrice, message.tokenAmounts); - uint256 expectedFeeUSDWei = 0; - for (uint256 i = 0; i < testTokens.length; ++i) { - expectedFeeUSDWei += configUSDCentToWei(tokenTransferFeeConfigs[i].minFeeUSDCents); + // If enforcement is on, only true should be allowed. + if (enforce && !allowOutOfOrderExecution) { + vm.expectRevert(PriceRegistry.ExtraArgOutOfOrderExecutionMustBeTrue.selector); } - - assertEq(expectedFeeUSDWei, feeUSDWei); - assertEq(expectedTotalGas, destGasOverhead); - assertEq(expectedTotalBytes, destBytesOverhead); - - // Set 1st token transfer to a meaningful amount so its bps fee is now between min and max fee - message.tokenAmounts[0] = Client.EVMTokenAmount({token: testTokens[0], amount: 10000e18}); - - (feeUSDWei, destGasOverhead, destBytesOverhead) = - s_onRamp.getTokenTransferCost(DEST_CHAIN_SELECTOR, message.feeToken, s_wrappedTokenPrice, message.tokenAmounts); - expectedFeeUSDWei = applyBpsRatio( - calcUSDValueFromTokenAmount(tokenPrices[0], message.tokenAmounts[0].amount), tokenTransferFeeConfigs[0].deciBps - ); - expectedFeeUSDWei += configUSDCentToWei(tokenTransferFeeConfigs[1].minFeeUSDCents); - expectedFeeUSDWei += configUSDCentToWei(tokenTransferFeeConfigs[2].minFeeUSDCents); - - assertEq(expectedFeeUSDWei, feeUSDWei); - assertEq(expectedTotalGas, destGasOverhead); - assertEq(expectedTotalBytes, destBytesOverhead); - - // Set 2nd token transfer to a large amount that is higher than maxFeeUSD - message.tokenAmounts[1] = Client.EVMTokenAmount({token: testTokens[1], amount: 1e36}); - - (feeUSDWei, destGasOverhead, destBytesOverhead) = - s_onRamp.getTokenTransferCost(DEST_CHAIN_SELECTOR, message.feeToken, s_wrappedTokenPrice, message.tokenAmounts); - expectedFeeUSDWei = applyBpsRatio( - calcUSDValueFromTokenAmount(tokenPrices[0], message.tokenAmounts[0].amount), tokenTransferFeeConfigs[0].deciBps - ); - expectedFeeUSDWei += configUSDCentToWei(tokenTransferFeeConfigs[1].maxFeeUSDCents); - expectedFeeUSDWei += configUSDCentToWei(tokenTransferFeeConfigs[2].minFeeUSDCents); - - assertEq(expectedFeeUSDWei, feeUSDWei); - assertEq(expectedTotalGas, destGasOverhead); - assertEq(expectedTotalBytes, destBytesOverhead); - } - - // reverts - - function test_UnsupportedToken_Revert() public { - address NOT_SUPPORTED_TOKEN = address(123); - Client.EVM2AnyMessage memory message = _generateSingleTokenMessage(NOT_SUPPORTED_TOKEN, 200); - - vm.expectRevert(abi.encodeWithSelector(EVM2EVMMultiOnRamp.UnsupportedToken.selector, NOT_SUPPORTED_TOKEN)); - - s_onRamp.getTokenTransferCost(DEST_CHAIN_SELECTOR, message.feeToken, s_feeTokenPrice, message.tokenAmounts); + s_onRamp.getFee(DEST_CHAIN_SELECTOR, message); } } @@ -1747,267 +763,6 @@ contract EVM2EVMMultiOnRamp_withdrawFeeTokens is EVM2EVMMultiOnRampSetup { } } -contract EVM2EVMMultiOnRamp_applyPremiumMultiplierWeiPerEthUpdates is EVM2EVMMultiOnRampSetup { - function test_Fuzz_applyPremiumMultiplierWeiPerEthUpdates_Success( - EVM2EVMMultiOnRamp.PremiumMultiplierWeiPerEthArgs memory premiumMultiplierWeiPerEthArg - ) public { - EVM2EVMMultiOnRamp.PremiumMultiplierWeiPerEthArgs[] memory premiumMultiplierWeiPerEthArgs = - new EVM2EVMMultiOnRamp.PremiumMultiplierWeiPerEthArgs[](1); - premiumMultiplierWeiPerEthArgs[0] = premiumMultiplierWeiPerEthArg; - - vm.expectEmit(); - emit EVM2EVMMultiOnRamp.PremiumMultiplierWeiPerEthUpdated( - premiumMultiplierWeiPerEthArg.token, premiumMultiplierWeiPerEthArg.premiumMultiplierWeiPerEth - ); - - s_onRamp.applyPremiumMultiplierWeiPerEthUpdates(premiumMultiplierWeiPerEthArgs); - - assertEq( - premiumMultiplierWeiPerEthArg.premiumMultiplierWeiPerEth, - s_onRamp.getPremiumMultiplierWeiPerEth(premiumMultiplierWeiPerEthArg.token) - ); - } - - function test_applyPremiumMultiplierWeiPerEthUpdatesSingleToken_Success() public { - EVM2EVMMultiOnRamp.PremiumMultiplierWeiPerEthArgs[] memory premiumMultiplierWeiPerEthArgs = - new EVM2EVMMultiOnRamp.PremiumMultiplierWeiPerEthArgs[](1); - premiumMultiplierWeiPerEthArgs[0] = s_premiumMultiplierWeiPerEthArgs[0]; - premiumMultiplierWeiPerEthArgs[0].token = vm.addr(1); - - vm.expectEmit(); - emit EVM2EVMMultiOnRamp.PremiumMultiplierWeiPerEthUpdated( - vm.addr(1), premiumMultiplierWeiPerEthArgs[0].premiumMultiplierWeiPerEth - ); - - s_onRamp.applyPremiumMultiplierWeiPerEthUpdates(premiumMultiplierWeiPerEthArgs); - - assertEq( - s_premiumMultiplierWeiPerEthArgs[0].premiumMultiplierWeiPerEth, s_onRamp.getPremiumMultiplierWeiPerEth(vm.addr(1)) - ); - } - - function test_applyPremiumMultiplierWeiPerEthUpdatesMultipleTokens_Success() public { - EVM2EVMMultiOnRamp.PremiumMultiplierWeiPerEthArgs[] memory premiumMultiplierWeiPerEthArgs = - new EVM2EVMMultiOnRamp.PremiumMultiplierWeiPerEthArgs[](2); - premiumMultiplierWeiPerEthArgs[0] = s_premiumMultiplierWeiPerEthArgs[0]; - premiumMultiplierWeiPerEthArgs[0].token = vm.addr(1); - premiumMultiplierWeiPerEthArgs[1].token = vm.addr(2); - - vm.expectEmit(); - emit EVM2EVMMultiOnRamp.PremiumMultiplierWeiPerEthUpdated( - vm.addr(1), premiumMultiplierWeiPerEthArgs[0].premiumMultiplierWeiPerEth - ); - vm.expectEmit(); - emit EVM2EVMMultiOnRamp.PremiumMultiplierWeiPerEthUpdated( - vm.addr(2), premiumMultiplierWeiPerEthArgs[1].premiumMultiplierWeiPerEth - ); - - s_onRamp.applyPremiumMultiplierWeiPerEthUpdates(premiumMultiplierWeiPerEthArgs); - - assertEq( - premiumMultiplierWeiPerEthArgs[0].premiumMultiplierWeiPerEth, s_onRamp.getPremiumMultiplierWeiPerEth(vm.addr(1)) - ); - assertEq( - premiumMultiplierWeiPerEthArgs[1].premiumMultiplierWeiPerEth, s_onRamp.getPremiumMultiplierWeiPerEth(vm.addr(2)) - ); - } - - function test_applyPremiumMultiplierWeiPerEthUpdatesZeroInput() public { - vm.recordLogs(); - s_onRamp.applyPremiumMultiplierWeiPerEthUpdates(new EVM2EVMMultiOnRamp.PremiumMultiplierWeiPerEthArgs[](0)); - - assertEq(vm.getRecordedLogs().length, 0); - } - - // Reverts - - function test_OnlyCallableByOwnerOrAdmin_Revert() public { - EVM2EVMMultiOnRamp.PremiumMultiplierWeiPerEthArgs[] memory premiumMultiplierWeiPerEthArgs; - vm.startPrank(STRANGER); - - vm.expectRevert("Only callable by owner"); - - s_onRamp.applyPremiumMultiplierWeiPerEthUpdates(premiumMultiplierWeiPerEthArgs); - } -} - -contract EVM2EVMMultiOnRamp_applyTokenTransferFeeConfigUpdates is EVM2EVMMultiOnRampSetup { - function test_Fuzz_ApplyTokenTransferFeeConfig_Success( - EVM2EVMMultiOnRamp.TokenTransferFeeConfig[2] memory tokenTransferFeeConfigs - ) public { - EVM2EVMMultiOnRamp.TokenTransferFeeConfigArgs[] memory tokenTransferFeeConfigArgs = - _generateTokenTransferFeeConfigArgs(2, 2); - tokenTransferFeeConfigArgs[0].destChainSelector = DEST_CHAIN_SELECTOR; - tokenTransferFeeConfigArgs[1].destChainSelector = DEST_CHAIN_SELECTOR + 1; - - for (uint256 i = 0; i < tokenTransferFeeConfigArgs.length; ++i) { - for (uint256 j = 0; j < tokenTransferFeeConfigs.length; ++j) { - tokenTransferFeeConfigs[j].destBytesOverhead = uint32( - bound(tokenTransferFeeConfigs[j].destBytesOverhead, Pool.CCIP_LOCK_OR_BURN_V1_RET_BYTES, type(uint32).max) - ); - address feeToken = s_sourceTokens[j]; - tokenTransferFeeConfigArgs[i].tokenTransferFeeConfigs[j].token = feeToken; - tokenTransferFeeConfigArgs[i].tokenTransferFeeConfigs[j].tokenTransferFeeConfig = tokenTransferFeeConfigs[j]; - - vm.expectEmit(); - emit EVM2EVMMultiOnRamp.TokenTransferFeeConfigUpdated( - tokenTransferFeeConfigArgs[i].destChainSelector, feeToken, tokenTransferFeeConfigs[j] - ); - } - } - - s_onRamp.applyTokenTransferFeeConfigUpdates( - tokenTransferFeeConfigArgs, new EVM2EVMMultiOnRamp.TokenTransferFeeConfigRemoveArgs[](0) - ); - - for (uint256 i = 0; i < tokenTransferFeeConfigs.length; ++i) { - _assertTokenTransferFeeConfigEqual( - tokenTransferFeeConfigs[i], - s_onRamp.getTokenTransferFeeConfig( - tokenTransferFeeConfigArgs[0].destChainSelector, - tokenTransferFeeConfigArgs[0].tokenTransferFeeConfigs[i].token - ) - ); - } - } - - function test_ApplyTokenTransferFeeConfig_Success() public { - EVM2EVMMultiOnRamp.TokenTransferFeeConfigArgs[] memory tokenTransferFeeConfigArgs = - _generateTokenTransferFeeConfigArgs(1, 2); - tokenTransferFeeConfigArgs[0].destChainSelector = DEST_CHAIN_SELECTOR; - tokenTransferFeeConfigArgs[0].tokenTransferFeeConfigs[0].token = address(5); - tokenTransferFeeConfigArgs[0].tokenTransferFeeConfigs[0].tokenTransferFeeConfig = EVM2EVMMultiOnRamp - .TokenTransferFeeConfig({ - minFeeUSDCents: 6, - maxFeeUSDCents: 7, - deciBps: 8, - destGasOverhead: 9, - destBytesOverhead: 312, - isEnabled: true - }); - tokenTransferFeeConfigArgs[0].tokenTransferFeeConfigs[1].token = address(11); - tokenTransferFeeConfigArgs[0].tokenTransferFeeConfigs[1].tokenTransferFeeConfig = EVM2EVMMultiOnRamp - .TokenTransferFeeConfig({ - minFeeUSDCents: 12, - maxFeeUSDCents: 13, - deciBps: 14, - destGasOverhead: 15, - destBytesOverhead: 394, - isEnabled: true - }); - - vm.expectEmit(); - emit EVM2EVMMultiOnRamp.TokenTransferFeeConfigUpdated( - tokenTransferFeeConfigArgs[0].destChainSelector, - tokenTransferFeeConfigArgs[0].tokenTransferFeeConfigs[0].token, - tokenTransferFeeConfigArgs[0].tokenTransferFeeConfigs[0].tokenTransferFeeConfig - ); - vm.expectEmit(); - emit EVM2EVMMultiOnRamp.TokenTransferFeeConfigUpdated( - tokenTransferFeeConfigArgs[0].destChainSelector, - tokenTransferFeeConfigArgs[0].tokenTransferFeeConfigs[1].token, - tokenTransferFeeConfigArgs[0].tokenTransferFeeConfigs[1].tokenTransferFeeConfig - ); - - EVM2EVMMultiOnRamp.TokenTransferFeeConfigRemoveArgs[] memory tokensToRemove = - new EVM2EVMMultiOnRamp.TokenTransferFeeConfigRemoveArgs[](0); - s_onRamp.applyTokenTransferFeeConfigUpdates(tokenTransferFeeConfigArgs, tokensToRemove); - - EVM2EVMMultiOnRamp.TokenTransferFeeConfig memory config0 = s_onRamp.getTokenTransferFeeConfig( - tokenTransferFeeConfigArgs[0].destChainSelector, tokenTransferFeeConfigArgs[0].tokenTransferFeeConfigs[0].token - ); - EVM2EVMMultiOnRamp.TokenTransferFeeConfig memory config1 = s_onRamp.getTokenTransferFeeConfig( - tokenTransferFeeConfigArgs[0].destChainSelector, tokenTransferFeeConfigArgs[0].tokenTransferFeeConfigs[1].token - ); - - _assertTokenTransferFeeConfigEqual( - tokenTransferFeeConfigArgs[0].tokenTransferFeeConfigs[0].tokenTransferFeeConfig, config0 - ); - _assertTokenTransferFeeConfigEqual( - tokenTransferFeeConfigArgs[0].tokenTransferFeeConfigs[1].tokenTransferFeeConfig, config1 - ); - - // Remove only the first token and validate only the first token is removed - tokensToRemove = new EVM2EVMMultiOnRamp.TokenTransferFeeConfigRemoveArgs[](1); - tokensToRemove[0] = EVM2EVMMultiOnRamp.TokenTransferFeeConfigRemoveArgs({ - destChainSelector: tokenTransferFeeConfigArgs[0].destChainSelector, - token: tokenTransferFeeConfigArgs[0].tokenTransferFeeConfigs[0].token - }); - - vm.expectEmit(); - emit EVM2EVMMultiOnRamp.TokenTransferFeeConfigDeleted( - tokenTransferFeeConfigArgs[0].destChainSelector, tokenTransferFeeConfigArgs[0].tokenTransferFeeConfigs[0].token - ); - - s_onRamp.applyTokenTransferFeeConfigUpdates(new EVM2EVMMultiOnRamp.TokenTransferFeeConfigArgs[](0), tokensToRemove); - - config0 = s_onRamp.getTokenTransferFeeConfig( - tokenTransferFeeConfigArgs[0].destChainSelector, tokenTransferFeeConfigArgs[0].tokenTransferFeeConfigs[0].token - ); - config1 = s_onRamp.getTokenTransferFeeConfig( - tokenTransferFeeConfigArgs[0].destChainSelector, tokenTransferFeeConfigArgs[0].tokenTransferFeeConfigs[1].token - ); - - EVM2EVMMultiOnRamp.TokenTransferFeeConfig memory emptyConfig; - - _assertTokenTransferFeeConfigEqual(emptyConfig, config0); - _assertTokenTransferFeeConfigEqual( - tokenTransferFeeConfigArgs[0].tokenTransferFeeConfigs[1].tokenTransferFeeConfig, config1 - ); - } - - function test_ApplyTokenTransferFeeZeroInput() public { - vm.recordLogs(); - s_onRamp.applyTokenTransferFeeConfigUpdates( - new EVM2EVMMultiOnRamp.TokenTransferFeeConfigArgs[](0), - new EVM2EVMMultiOnRamp.TokenTransferFeeConfigRemoveArgs[](0) - ); - - assertEq(vm.getRecordedLogs().length, 0); - } - - // Reverts - - function test_OnlyCallableByOwnerOrAdmin_Revert() public { - vm.startPrank(STRANGER); - EVM2EVMMultiOnRamp.TokenTransferFeeConfigArgs[] memory tokenTransferFeeConfigArgs; - - vm.expectRevert("Only callable by owner"); - - s_onRamp.applyTokenTransferFeeConfigUpdates( - tokenTransferFeeConfigArgs, new EVM2EVMMultiOnRamp.TokenTransferFeeConfigRemoveArgs[](0) - ); - } - - function test_InvalidDestBytesOverhead_Revert() public { - EVM2EVMMultiOnRamp.TokenTransferFeeConfigArgs[] memory tokenTransferFeeConfigArgs = - _generateTokenTransferFeeConfigArgs(1, 1); - tokenTransferFeeConfigArgs[0].destChainSelector = DEST_CHAIN_SELECTOR; - tokenTransferFeeConfigArgs[0].tokenTransferFeeConfigs[0].token = address(5); - tokenTransferFeeConfigArgs[0].tokenTransferFeeConfigs[0].tokenTransferFeeConfig = EVM2EVMMultiOnRamp - .TokenTransferFeeConfig({ - minFeeUSDCents: 6, - maxFeeUSDCents: 7, - deciBps: 8, - destGasOverhead: 9, - destBytesOverhead: uint32(Pool.CCIP_LOCK_OR_BURN_V1_RET_BYTES - 1), - isEnabled: true - }); - - vm.expectRevert( - abi.encodeWithSelector( - EVM2EVMMultiOnRamp.InvalidDestBytesOverhead.selector, - tokenTransferFeeConfigArgs[0].tokenTransferFeeConfigs[0].token, - tokenTransferFeeConfigArgs[0].tokenTransferFeeConfigs[0].tokenTransferFeeConfig.destBytesOverhead - ) - ); - - s_onRamp.applyTokenTransferFeeConfigUpdates( - tokenTransferFeeConfigArgs, new EVM2EVMMultiOnRamp.TokenTransferFeeConfigRemoveArgs[](0) - ); - } -} - contract EVM2EVMMultiOnRamp_getTokenPool is EVM2EVMMultiOnRampSetup { function test_GetTokenPool_Success() public view { assertEq( @@ -2025,94 +780,3 @@ contract EVM2EVMMultiOnRamp_getTokenPool is EVM2EVMMultiOnRampSetup { assertEq(address(0), nonExistentPool); } } - -contract EVM2EVMMultiOnRamp_validateDestFamilyAddress is EVM2EVMMultiOnRampSetup { - function test_ValidEVMAddress_Success() public view { - bytes memory encodedAddress = abi.encode(address(10000)); - s_onRamp.validateDestFamilyAddress(Internal.CHAIN_FAMILY_SELECTOR_EVM, encodedAddress); - } - - function test_ValidNonEVMAddress_Success() public view { - s_onRamp.validateDestFamilyAddress(bytes4(uint32(1)), abi.encode(type(uint208).max)); - } - - // Reverts - - function test_InvalidEVMAddress_Revert() public { - bytes memory invalidAddress = abi.encode(type(uint208).max); - vm.expectRevert(abi.encodeWithSelector(Internal.InvalidEVMAddress.selector, invalidAddress)); - s_onRamp.validateDestFamilyAddress(Internal.CHAIN_FAMILY_SELECTOR_EVM, invalidAddress); - } -} - -contract EVM2EVMMultiOnRamp_convertParsedExtraArgs is EVM2EVMMultiOnRampSetup { - EVM2EVMMultiOnRamp.DestChainDynamicConfig private s_destChainDynamicConfig; - - function setUp() public virtual override { - super.setUp(); - s_destChainDynamicConfig = _generateDestChainConfigArgs()[0].dynamicConfig; - } - - function test_EVMExtraArgsV1_Success() public view { - Client.EVMExtraArgsV1 memory inputArgs = Client.EVMExtraArgsV1({gasLimit: GAS_LIMIT}); - bytes memory inputExtraArgs = Client._argsToBytes(inputArgs); - Client.EVMExtraArgsV2 memory expectedOutputArgs = - Client.EVMExtraArgsV2({gasLimit: GAS_LIMIT, allowOutOfOrderExecution: false}); - - vm.assertEq( - s_onRamp.convertParsedExtraArgs(inputExtraArgs, s_destChainDynamicConfig), abi.encode(expectedOutputArgs) - ); - } - - function test_EVMExtraArgsV2_Success() public view { - Client.EVMExtraArgsV2 memory inputArgs = - Client.EVMExtraArgsV2({gasLimit: GAS_LIMIT, allowOutOfOrderExecution: true}); - bytes memory inputExtraArgs = Client._argsToBytes(inputArgs); - - vm.assertEq(s_onRamp.convertParsedExtraArgs(inputExtraArgs, s_destChainDynamicConfig), abi.encode(inputArgs)); - } - - function test_EVMExtraArgsDefault_Success() public view { - Client.EVMExtraArgsV2 memory expectedOutputArgs = - Client.EVMExtraArgsV2({gasLimit: s_destChainDynamicConfig.defaultTxGasLimit, allowOutOfOrderExecution: false}); - - vm.assertEq(s_onRamp.convertParsedExtraArgs("", s_destChainDynamicConfig), abi.encode(expectedOutputArgs)); - } - - function test_EmptyExtraArgs_Success() public { - s_destChainDynamicConfig.chainFamilySelector = bytes4(uint32(1)); - vm.assertEq(s_onRamp.convertParsedExtraArgs("", s_destChainDynamicConfig), ""); - } - - // Reverts - - function test_EVMExtraArgsInvalidExtraArgsTag_Revert() public { - Client.EVMExtraArgsV2 memory inputArgs = - Client.EVMExtraArgsV2({gasLimit: GAS_LIMIT, allowOutOfOrderExecution: true}); - bytes memory inputExtraArgs = Client._argsToBytes(inputArgs); - // Invalidate selector - inputExtraArgs[0] = bytes1(uint8(0)); - - vm.expectRevert(EVM2EVMMultiOnRamp.InvalidExtraArgsTag.selector); - s_onRamp.convertParsedExtraArgs(inputExtraArgs, s_destChainDynamicConfig); - } - - function test_EVMExtraArgsEnforceOutOfOrder_Revert() public { - Client.EVMExtraArgsV2 memory inputArgs = - Client.EVMExtraArgsV2({gasLimit: GAS_LIMIT, allowOutOfOrderExecution: false}); - bytes memory inputExtraArgs = Client._argsToBytes(inputArgs); - s_destChainDynamicConfig.enforceOutOfOrder = true; - - vm.expectRevert(EVM2EVMMultiOnRamp.ExtraArgOutOfOrderExecutionMustBeTrue.selector); - s_onRamp.convertParsedExtraArgs(inputExtraArgs, s_destChainDynamicConfig); - } - - function test_EVMExtraArgsGasLimitTooHigh_Revert() public { - Client.EVMExtraArgsV2 memory inputArgs = - Client.EVMExtraArgsV2({gasLimit: s_destChainDynamicConfig.maxPerMsgGasLimit + 1, allowOutOfOrderExecution: true}); - bytes memory inputExtraArgs = Client._argsToBytes(inputArgs); - - vm.expectRevert(EVM2EVMMultiOnRamp.MessageGasLimitTooHigh.selector); - s_onRamp.convertParsedExtraArgs(inputExtraArgs, s_destChainDynamicConfig); - } -} diff --git a/contracts/src/v0.8/ccip/test/onRamp/EVM2EVMMultiOnRampSetup.t.sol b/contracts/src/v0.8/ccip/test/onRamp/EVM2EVMMultiOnRampSetup.t.sol index 24a47d1aca..36fc23042e 100644 --- a/contracts/src/v0.8/ccip/test/onRamp/EVM2EVMMultiOnRampSetup.t.sol +++ b/contracts/src/v0.8/ccip/test/onRamp/EVM2EVMMultiOnRampSetup.t.sol @@ -16,14 +16,11 @@ import {TokenAdminRegistry} from "../../tokenAdminRegistry/TokenAdminRegistry.so import {TokenSetup} from "../TokenSetup.t.sol"; import {EVM2EVMMultiOnRampHelper} from "../helpers/EVM2EVMMultiOnRampHelper.sol"; import {MessageInterceptorHelper} from "../helpers/MessageInterceptorHelper.sol"; -import {PriceRegistrySetup} from "../priceRegistry/PriceRegistry.t.sol"; +import {PriceRegistryFeeSetup} from "../priceRegistry/PriceRegistry.t.sol"; import {IERC20} from "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/IERC20.sol"; -contract EVM2EVMMultiOnRampSetup is TokenSetup, PriceRegistrySetup { - address internal constant CUSTOM_TOKEN = address(12345); - uint224 internal constant CUSTOM_TOKEN_PRICE = 1e17; // $0.1 CUSTOM - +contract EVM2EVMMultiOnRampSetup is TokenSetup, PriceRegistryFeeSetup { uint256 internal immutable i_tokenAmount0 = 9; uint256 internal immutable i_tokenAmount1 = 7; @@ -36,69 +33,9 @@ contract EVM2EVMMultiOnRampSetup is TokenSetup, PriceRegistrySetup { address internal s_destTokenPool = makeAddr("destTokenPool"); address internal s_destToken = makeAddr("destToken"); - EVM2EVMMultiOnRamp.PremiumMultiplierWeiPerEthArgs[] internal s_premiumMultiplierWeiPerEthArgs; - EVM2EVMMultiOnRamp.TokenTransferFeeConfigArgs[] internal s_tokenTransferFeeConfigArgs; - - function setUp() public virtual override(TokenSetup, PriceRegistrySetup) { + function setUp() public virtual override(TokenSetup, PriceRegistryFeeSetup) { TokenSetup.setUp(); - PriceRegistrySetup.setUp(); - - s_priceRegistry.updatePrices(getSingleTokenPriceUpdateStruct(CUSTOM_TOKEN, CUSTOM_TOKEN_PRICE)); - - s_premiumMultiplierWeiPerEthArgs.push( - EVM2EVMMultiOnRamp.PremiumMultiplierWeiPerEthArgs({ - token: s_sourceFeeToken, - premiumMultiplierWeiPerEth: 5e17 // 0.5x - }) - ); - s_premiumMultiplierWeiPerEthArgs.push( - EVM2EVMMultiOnRamp.PremiumMultiplierWeiPerEthArgs({ - token: s_sourceRouter.getWrappedNative(), - premiumMultiplierWeiPerEth: 2e18 // 2x - }) - ); - - s_tokenTransferFeeConfigArgs.push(); - s_tokenTransferFeeConfigArgs[0].destChainSelector = DEST_CHAIN_SELECTOR; - s_tokenTransferFeeConfigArgs[0].tokenTransferFeeConfigs.push( - EVM2EVMMultiOnRamp.TokenTransferFeeConfigSingleTokenArgs({ - token: s_sourceFeeToken, - tokenTransferFeeConfig: EVM2EVMMultiOnRamp.TokenTransferFeeConfig({ - minFeeUSDCents: 1_00, // 1 USD - maxFeeUSDCents: 1000_00, // 1,000 USD - deciBps: 2_5, // 2.5 bps, or 0.025% - destGasOverhead: 40_000, - destBytesOverhead: 32, - isEnabled: true - }) - }) - ); - s_tokenTransferFeeConfigArgs[0].tokenTransferFeeConfigs.push( - EVM2EVMMultiOnRamp.TokenTransferFeeConfigSingleTokenArgs({ - token: s_sourceRouter.getWrappedNative(), - tokenTransferFeeConfig: EVM2EVMMultiOnRamp.TokenTransferFeeConfig({ - minFeeUSDCents: 50, // 0.5 USD - maxFeeUSDCents: 500_00, // 500 USD - deciBps: 5_0, // 5 bps, or 0.05% - destGasOverhead: 10_000, - destBytesOverhead: 100, - isEnabled: true - }) - }) - ); - s_tokenTransferFeeConfigArgs[0].tokenTransferFeeConfigs.push( - EVM2EVMMultiOnRamp.TokenTransferFeeConfigSingleTokenArgs({ - token: CUSTOM_TOKEN, - tokenTransferFeeConfig: EVM2EVMMultiOnRamp.TokenTransferFeeConfig({ - minFeeUSDCents: 2_00, // 1 USD - maxFeeUSDCents: 2000_00, // 1,000 USD - deciBps: 10_0, // 10 bps, or 0.1% - destGasOverhead: 1, - destBytesOverhead: 200, - isEnabled: true - }) - }) - ); + PriceRegistryFeeSetup.setUp(); s_outboundMessageValidator = new MessageInterceptorHelper(); s_outboundNonceManager = new NonceManager(new address[](0)); @@ -135,32 +72,6 @@ contract EVM2EVMMultiOnRampSetup is TokenSetup, PriceRegistrySetup { }); } - function _generateSingleTokenMessage( - address token, - uint256 amount - ) public view returns (Client.EVM2AnyMessage memory) { - Client.EVMTokenAmount[] memory tokenAmounts = new Client.EVMTokenAmount[](1); - tokenAmounts[0] = Client.EVMTokenAmount({token: token, amount: amount}); - - return Client.EVM2AnyMessage({ - receiver: abi.encode(OWNER), - data: "", - tokenAmounts: tokenAmounts, - feeToken: s_sourceFeeToken, - extraArgs: Client._argsToBytes(Client.EVMExtraArgsV1({gasLimit: GAS_LIMIT})) - }); - } - - function _generateEmptyMessage() public view returns (Client.EVM2AnyMessage memory) { - return Client.EVM2AnyMessage({ - receiver: abi.encode(OWNER), - data: "", - tokenAmounts: new Client.EVMTokenAmount[](0), - feeToken: s_sourceFeeToken, - extraArgs: Client._argsToBytes(Client.EVMExtraArgsV1({gasLimit: GAS_LIMIT})) - }); - } - function _messageToEvent( Client.EVM2AnyMessage memory message, uint64 seqNum, @@ -192,7 +103,8 @@ contract EVM2EVMMultiOnRampSetup is TokenSetup, PriceRegistrySetup { bytes32 metadataHash, TokenAdminRegistry tokenAdminRegistry ) internal view returns (Internal.EVM2AnyRampMessage memory) { - Client.EVMExtraArgsV2 memory extraArgs = s_onRamp.parseEVMExtraArgsFromBytes(message.extraArgs, destChainSelector); + Client.EVMExtraArgsV2 memory extraArgs = + s_priceRegistry.parseEVMExtraArgsFromBytes(message.extraArgs, destChainSelector); Internal.EVM2AnyRampMessage memory messageEvent = Internal.EVM2AnyRampMessage({ header: Internal.RampMessageHeader({ @@ -254,46 +166,6 @@ contract EVM2EVMMultiOnRampSetup is TokenSetup, PriceRegistrySetup { return result; } - function _generateDestChainConfigArgs() internal pure returns (EVM2EVMMultiOnRamp.DestChainConfigArgs[] memory) { - EVM2EVMMultiOnRamp.DestChainConfigArgs[] memory destChainConfigs = new EVM2EVMMultiOnRamp.DestChainConfigArgs[](1); - destChainConfigs[0] = EVM2EVMMultiOnRamp.DestChainConfigArgs({ - destChainSelector: DEST_CHAIN_SELECTOR, - dynamicConfig: EVM2EVMMultiOnRamp.DestChainDynamicConfig({ - isEnabled: true, - maxNumberOfTokensPerMsg: MAX_TOKENS_LENGTH, - destGasOverhead: DEST_GAS_OVERHEAD, - destGasPerPayloadByte: DEST_GAS_PER_PAYLOAD_BYTE, - destDataAvailabilityOverheadGas: DEST_DATA_AVAILABILITY_OVERHEAD_GAS, - destGasPerDataAvailabilityByte: DEST_GAS_PER_DATA_AVAILABILITY_BYTE, - destDataAvailabilityMultiplierBps: DEST_GAS_DATA_AVAILABILITY_MULTIPLIER_BPS, - maxDataBytes: MAX_DATA_SIZE, - maxPerMsgGasLimit: MAX_GAS_LIMIT, - defaultTokenFeeUSDCents: DEFAULT_TOKEN_FEE_USD_CENTS, - defaultTokenDestGasOverhead: DEFAULT_TOKEN_DEST_GAS_OVERHEAD, - defaultTokenDestBytesOverhead: DEFAULT_TOKEN_BYTES_OVERHEAD, - defaultTxGasLimit: GAS_LIMIT, - gasMultiplierWeiPerEth: 5e17, - networkFeeUSDCents: 1_00, - enforceOutOfOrder: false, - chainFamilySelector: Internal.CHAIN_FAMILY_SELECTOR_EVM - }) - }); - return destChainConfigs; - } - - function _generateTokenTransferFeeConfigArgs( - uint256 destChainSelectorLength, - uint256 tokenLength - ) internal pure returns (EVM2EVMMultiOnRamp.TokenTransferFeeConfigArgs[] memory) { - EVM2EVMMultiOnRamp.TokenTransferFeeConfigArgs[] memory tokenTransferFeeConfigArgs = - new EVM2EVMMultiOnRamp.TokenTransferFeeConfigArgs[](destChainSelectorLength); - for (uint256 i = 0; i < destChainSelectorLength; ++i) { - tokenTransferFeeConfigArgs[i].tokenTransferFeeConfigs = - new EVM2EVMMultiOnRamp.TokenTransferFeeConfigSingleTokenArgs[](tokenLength); - } - return tokenTransferFeeConfigArgs; - } - function _deployOnRamp( uint64 sourceChainSelector, address sourceRouter, @@ -302,17 +174,12 @@ contract EVM2EVMMultiOnRampSetup is TokenSetup, PriceRegistrySetup { ) internal returns (EVM2EVMMultiOnRampHelper, bytes32 metadataHash) { EVM2EVMMultiOnRampHelper onRamp = new EVM2EVMMultiOnRampHelper( EVM2EVMMultiOnRamp.StaticConfig({ - linkToken: s_sourceTokens[0], chainSelector: sourceChainSelector, - maxFeeJuelsPerMsg: MAX_MSG_FEES_JUELS, rmnProxy: address(s_mockRMN), nonceManager: nonceManager, tokenAdminRegistry: tokenAdminRegistry }), - _generateDynamicMultiOnRampConfig(sourceRouter, address(s_priceRegistry)), - _generateDestChainConfigArgs(), - s_premiumMultiplierWeiPerEthArgs, - s_tokenTransferFeeConfigArgs + _generateDynamicMultiOnRampConfig(sourceRouter, address(s_priceRegistry)) ); address[] memory authorizedCallers = new address[](1); @@ -349,34 +216,11 @@ contract EVM2EVMMultiOnRampSetup is TokenSetup, PriceRegistrySetup { } } - function _assertDestChainConfigsEqual( - EVM2EVMMultiOnRamp.DestChainConfig memory a, - EVM2EVMMultiOnRamp.DestChainConfig memory b - ) internal pure { - assertEq(a.dynamicConfig.isEnabled, b.dynamicConfig.isEnabled); - assertEq(a.dynamicConfig.maxNumberOfTokensPerMsg, b.dynamicConfig.maxNumberOfTokensPerMsg); - assertEq(a.dynamicConfig.maxDataBytes, b.dynamicConfig.maxDataBytes); - assertEq(a.dynamicConfig.maxPerMsgGasLimit, b.dynamicConfig.maxPerMsgGasLimit); - assertEq(a.dynamicConfig.destGasOverhead, b.dynamicConfig.destGasOverhead); - assertEq(a.dynamicConfig.destGasPerPayloadByte, b.dynamicConfig.destGasPerPayloadByte); - assertEq(a.dynamicConfig.destDataAvailabilityOverheadGas, b.dynamicConfig.destDataAvailabilityOverheadGas); - assertEq(a.dynamicConfig.destGasPerDataAvailabilityByte, b.dynamicConfig.destGasPerDataAvailabilityByte); - assertEq(a.dynamicConfig.destDataAvailabilityMultiplierBps, b.dynamicConfig.destDataAvailabilityMultiplierBps); - assertEq(a.dynamicConfig.defaultTokenFeeUSDCents, b.dynamicConfig.defaultTokenFeeUSDCents); - assertEq(a.dynamicConfig.defaultTokenDestGasOverhead, b.dynamicConfig.defaultTokenDestGasOverhead); - assertEq(a.dynamicConfig.defaultTokenDestBytesOverhead, b.dynamicConfig.defaultTokenDestBytesOverhead); - assertEq(a.dynamicConfig.defaultTxGasLimit, b.dynamicConfig.defaultTxGasLimit); - assertEq(a.sequenceNumber, b.sequenceNumber); - assertEq(a.metadataHash, b.metadataHash); - } - function _assertStaticConfigsEqual( EVM2EVMMultiOnRamp.StaticConfig memory a, EVM2EVMMultiOnRamp.StaticConfig memory b ) internal pure { - assertEq(a.linkToken, b.linkToken); assertEq(a.chainSelector, b.chainSelector); - assertEq(a.maxFeeJuelsPerMsg, b.maxFeeJuelsPerMsg); assertEq(a.rmnProxy, b.rmnProxy); assertEq(a.tokenAdminRegistry, b.tokenAdminRegistry); } @@ -388,16 +232,4 @@ contract EVM2EVMMultiOnRampSetup is TokenSetup, PriceRegistrySetup { assertEq(a.router, b.router); assertEq(a.priceRegistry, b.priceRegistry); } - - function _assertTokenTransferFeeConfigEqual( - EVM2EVMMultiOnRamp.TokenTransferFeeConfig memory a, - EVM2EVMMultiOnRamp.TokenTransferFeeConfig memory b - ) internal pure { - assertEq(a.minFeeUSDCents, b.minFeeUSDCents); - assertEq(a.maxFeeUSDCents, b.maxFeeUSDCents); - assertEq(a.deciBps, b.deciBps); - assertEq(a.destGasOverhead, b.destGasOverhead); - assertEq(a.destBytesOverhead, b.destBytesOverhead); - assertEq(a.isEnabled, b.isEnabled); - } } diff --git a/contracts/src/v0.8/ccip/test/onRamp/EVM2EVMOnRampSetup.t.sol b/contracts/src/v0.8/ccip/test/onRamp/EVM2EVMOnRampSetup.t.sol index 0695e9d7a3..6659b1217f 100644 --- a/contracts/src/v0.8/ccip/test/onRamp/EVM2EVMOnRampSetup.t.sol +++ b/contracts/src/v0.8/ccip/test/onRamp/EVM2EVMOnRampSetup.t.sol @@ -18,9 +18,6 @@ import {PriceRegistrySetup} from "../priceRegistry/PriceRegistry.t.sol"; import {IERC20} from "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/IERC20.sol"; contract EVM2EVMOnRampSetup is TokenSetup, PriceRegistrySetup { - address internal constant CUSTOM_TOKEN = address(12345); - uint224 internal constant CUSTOM_TOKEN_PRICE = 1e17; // $0.1 CUSTOM - uint256 internal immutable i_tokenAmount0 = 9; uint256 internal immutable i_tokenAmount1 = 7; diff --git a/contracts/src/v0.8/ccip/test/priceRegistry/PriceRegistry.t.sol b/contracts/src/v0.8/ccip/test/priceRegistry/PriceRegistry.t.sol index bc1a473f3c..0781363df5 100644 --- a/contracts/src/v0.8/ccip/test/priceRegistry/PriceRegistry.t.sol +++ b/contracts/src/v0.8/ccip/test/priceRegistry/PriceRegistry.t.sol @@ -5,8 +5,13 @@ import {AuthorizedCallers} from "../../../shared/access/AuthorizedCallers.sol"; import {MockV3Aggregator} from "../../../tests/MockV3Aggregator.sol"; import {PriceRegistry} from "../../PriceRegistry.sol"; import {IPriceRegistry} from "../../interfaces/IPriceRegistry.sol"; +import {Client} from "../../libraries/Client.sol"; import {Internal} from "../../libraries/Internal.sol"; +import {Pool} from "../../libraries/Pool.sol"; +import {USDPriceWith18Decimals} from "../../libraries/USDPriceWith18Decimals.sol"; + import {TokenSetup} from "../TokenSetup.t.sol"; +import {PriceRegistryHelper} from "../helpers/PriceRegistryHelper.sol"; import {Vm} from "forge-std/Vm.sol"; import {console} from "forge-std/console.sol"; @@ -14,12 +19,15 @@ contract PriceRegistrySetup is TokenSetup { uint112 internal constant USD_PER_GAS = 1e6; // 0.001 gwei uint112 internal constant USD_PER_DATA_AVAILABILITY_GAS = 1e9; // 1 gwei + address internal constant CUSTOM_TOKEN = address(12345); + uint224 internal constant CUSTOM_TOKEN_PRICE = 1e17; // $0.1 CUSTOM + // Encode L1 gas price and L2 gas price into a packed price. // L1 gas price is left-shifted to the higher-order bits. uint224 internal constant PACKED_USD_PER_GAS = (uint224(USD_PER_DATA_AVAILABILITY_GAS) << Internal.GAS_PRICE_BITS) + USD_PER_GAS; - PriceRegistry internal s_priceRegistry; + PriceRegistryHelper internal s_priceRegistry; // Cheat to store the price updates in storage since struct arrays aren't supported. bytes internal s_encodedInitialPriceUpdates; address internal s_weth; @@ -29,6 +37,9 @@ contract PriceRegistrySetup is TokenSetup { address[] internal s_destFeeTokens; uint224[] internal s_destTokenPrices; + PriceRegistry.PremiumMultiplierWeiPerEthArgs[] internal s_priceRegistryPremiumMultiplierWeiPerEthArgs; + PriceRegistry.TokenTransferFeeConfigArgs[] internal s_priceRegistryTokenTransferFeeConfigArgs; + mapping(address token => address dataFeedAddress) internal s_dataFeedByToken; function setUp() public virtual override { @@ -88,7 +99,74 @@ contract PriceRegistrySetup is TokenSetup { feeTokens[1] = s_weth; PriceRegistry.TokenPriceFeedUpdate[] memory tokenPriceFeedUpdates = new PriceRegistry.TokenPriceFeedUpdate[](0); - s_priceRegistry = new PriceRegistry(priceUpdaters, feeTokens, uint32(TWELVE_HOURS), tokenPriceFeedUpdates); + s_priceRegistryPremiumMultiplierWeiPerEthArgs.push( + PriceRegistry.PremiumMultiplierWeiPerEthArgs({ + token: s_sourceFeeToken, + premiumMultiplierWeiPerEth: 5e17 // 0.5x + }) + ); + s_priceRegistryPremiumMultiplierWeiPerEthArgs.push( + PriceRegistry.PremiumMultiplierWeiPerEthArgs({ + token: s_sourceRouter.getWrappedNative(), + premiumMultiplierWeiPerEth: 2e18 // 2x + }) + ); + + s_priceRegistryTokenTransferFeeConfigArgs.push(); + s_priceRegistryTokenTransferFeeConfigArgs[0].destChainSelector = DEST_CHAIN_SELECTOR; + s_priceRegistryTokenTransferFeeConfigArgs[0].tokenTransferFeeConfigs.push( + PriceRegistry.TokenTransferFeeConfigSingleTokenArgs({ + token: s_sourceFeeToken, + tokenTransferFeeConfig: PriceRegistry.TokenTransferFeeConfig({ + minFeeUSDCents: 1_00, // 1 USD + maxFeeUSDCents: 1000_00, // 1,000 USD + deciBps: 2_5, // 2.5 bps, or 0.025% + destGasOverhead: 40_000, + destBytesOverhead: 32, + isEnabled: true + }) + }) + ); + s_priceRegistryTokenTransferFeeConfigArgs[0].tokenTransferFeeConfigs.push( + PriceRegistry.TokenTransferFeeConfigSingleTokenArgs({ + token: s_sourceRouter.getWrappedNative(), + tokenTransferFeeConfig: PriceRegistry.TokenTransferFeeConfig({ + minFeeUSDCents: 50, // 0.5 USD + maxFeeUSDCents: 500_00, // 500 USD + deciBps: 5_0, // 5 bps, or 0.05% + destGasOverhead: 10_000, + destBytesOverhead: 100, + isEnabled: true + }) + }) + ); + s_priceRegistryTokenTransferFeeConfigArgs[0].tokenTransferFeeConfigs.push( + PriceRegistry.TokenTransferFeeConfigSingleTokenArgs({ + token: CUSTOM_TOKEN, + tokenTransferFeeConfig: PriceRegistry.TokenTransferFeeConfig({ + minFeeUSDCents: 2_00, // 1 USD + maxFeeUSDCents: 2000_00, // 1,000 USD + deciBps: 10_0, // 10 bps, or 0.1% + destGasOverhead: 1, + destBytesOverhead: 200, + isEnabled: true + }) + }) + ); + + s_priceRegistry = new PriceRegistryHelper( + PriceRegistry.StaticConfig({ + linkToken: s_sourceTokens[0], + maxFeeJuelsPerMsg: MAX_MSG_FEES_JUELS, + stalenessThreshold: uint32(TWELVE_HOURS) + }), + priceUpdaters, + feeTokens, + tokenPriceFeedUpdates, + s_priceRegistryTokenTransferFeeConfigArgs, + s_priceRegistryPremiumMultiplierWeiPerEthArgs, + _generatePriceRegistryDestChainDynamicConfigArgs() + ); s_priceRegistry.updatePrices(priceUpdates); } @@ -140,6 +218,51 @@ contract PriceRegistrySetup is TokenSetup { return s_sourceTokens[0]; } + function _generateTokenTransferFeeConfigArgs( + uint256 destChainSelectorLength, + uint256 tokenLength + ) internal pure returns (PriceRegistry.TokenTransferFeeConfigArgs[] memory) { + PriceRegistry.TokenTransferFeeConfigArgs[] memory tokenTransferFeeConfigArgs = + new PriceRegistry.TokenTransferFeeConfigArgs[](destChainSelectorLength); + for (uint256 i = 0; i < destChainSelectorLength; ++i) { + tokenTransferFeeConfigArgs[i].tokenTransferFeeConfigs = + new PriceRegistry.TokenTransferFeeConfigSingleTokenArgs[](tokenLength); + } + return tokenTransferFeeConfigArgs; + } + + function _generatePriceRegistryDestChainDynamicConfigArgs() + internal + pure + returns (PriceRegistry.DestChainDynamicConfigArgs[] memory) + { + PriceRegistry.DestChainDynamicConfigArgs[] memory destChainConfigs = + new PriceRegistry.DestChainDynamicConfigArgs[](1); + destChainConfigs[0] = PriceRegistry.DestChainDynamicConfigArgs({ + destChainSelector: DEST_CHAIN_SELECTOR, + dynamicConfig: PriceRegistry.DestChainDynamicConfig({ + isEnabled: true, + maxNumberOfTokensPerMsg: MAX_TOKENS_LENGTH, + destGasOverhead: DEST_GAS_OVERHEAD, + destGasPerPayloadByte: DEST_GAS_PER_PAYLOAD_BYTE, + destDataAvailabilityOverheadGas: DEST_DATA_AVAILABILITY_OVERHEAD_GAS, + destGasPerDataAvailabilityByte: DEST_GAS_PER_DATA_AVAILABILITY_BYTE, + destDataAvailabilityMultiplierBps: DEST_GAS_DATA_AVAILABILITY_MULTIPLIER_BPS, + maxDataBytes: MAX_DATA_SIZE, + maxPerMsgGasLimit: MAX_GAS_LIMIT, + defaultTokenFeeUSDCents: DEFAULT_TOKEN_FEE_USD_CENTS, + defaultTokenDestGasOverhead: DEFAULT_TOKEN_DEST_GAS_OVERHEAD, + defaultTokenDestBytesOverhead: DEFAULT_TOKEN_BYTES_OVERHEAD, + defaultTxGasLimit: GAS_LIMIT, + gasMultiplierWeiPerEth: 5e17, + networkFeeUSDCents: 1_00, + enforceOutOfOrder: false, + chainFamilySelector: Internal.CHAIN_FAMILY_SELECTOR_EVM + }) + }); + return destChainConfigs; + } + function _assertTokenPriceFeedConfigEquality( IPriceRegistry.TokenPriceFeedConfig memory config1, IPriceRegistry.TokenPriceFeedConfig memory config2 @@ -157,6 +280,147 @@ contract PriceRegistrySetup is TokenSetup { config, IPriceRegistry.TokenPriceFeedConfig({dataFeedAddress: address(0), tokenDecimals: 0}) ); } + + function _assertTokenTransferFeeConfigEqual( + PriceRegistry.TokenTransferFeeConfig memory a, + PriceRegistry.TokenTransferFeeConfig memory b + ) internal pure { + assertEq(a.minFeeUSDCents, b.minFeeUSDCents); + assertEq(a.maxFeeUSDCents, b.maxFeeUSDCents); + assertEq(a.deciBps, b.deciBps); + assertEq(a.destGasOverhead, b.destGasOverhead); + assertEq(a.destBytesOverhead, b.destBytesOverhead); + assertEq(a.isEnabled, b.isEnabled); + } + + function _assertPriceRegistryStaticConfigsEqual( + PriceRegistry.StaticConfig memory a, + PriceRegistry.StaticConfig memory b + ) internal pure { + assertEq(a.linkToken, b.linkToken); + assertEq(a.maxFeeJuelsPerMsg, b.maxFeeJuelsPerMsg); + } + + function _assertPriceRegistryDestChainDynamicConfigsEqual( + PriceRegistry.DestChainDynamicConfig memory a, + PriceRegistry.DestChainDynamicConfig memory b + ) internal pure { + assertEq(a.isEnabled, b.isEnabled); + assertEq(a.maxNumberOfTokensPerMsg, b.maxNumberOfTokensPerMsg); + assertEq(a.maxDataBytes, b.maxDataBytes); + assertEq(a.maxPerMsgGasLimit, b.maxPerMsgGasLimit); + assertEq(a.destGasOverhead, b.destGasOverhead); + assertEq(a.destGasPerPayloadByte, b.destGasPerPayloadByte); + assertEq(a.destDataAvailabilityOverheadGas, b.destDataAvailabilityOverheadGas); + assertEq(a.destGasPerDataAvailabilityByte, b.destGasPerDataAvailabilityByte); + assertEq(a.destDataAvailabilityMultiplierBps, b.destDataAvailabilityMultiplierBps); + assertEq(a.defaultTokenFeeUSDCents, b.defaultTokenFeeUSDCents); + assertEq(a.defaultTokenDestGasOverhead, b.defaultTokenDestGasOverhead); + assertEq(a.defaultTokenDestBytesOverhead, b.defaultTokenDestBytesOverhead); + assertEq(a.defaultTxGasLimit, b.defaultTxGasLimit); + } +} + +contract PriceRegistryFeeSetup is PriceRegistrySetup { + uint224 internal s_feeTokenPrice; + uint224 internal s_wrappedTokenPrice; + uint224 internal s_customTokenPrice; + + address internal s_selfServeTokenDefaultPricing = makeAddr("self-serve-token-default-pricing"); + + function setUp() public virtual override { + super.setUp(); + + s_feeTokenPrice = s_sourceTokenPrices[0]; + s_wrappedTokenPrice = s_sourceTokenPrices[2]; + s_customTokenPrice = CUSTOM_TOKEN_PRICE; + + s_priceRegistry.updatePrices(getSingleTokenPriceUpdateStruct(CUSTOM_TOKEN, CUSTOM_TOKEN_PRICE)); + } + + function _setupFeeTokenPools() internal { + // Add additional pool addresses for test tokens to mark them as supported + s_tokenAdminRegistry.proposeAdministrator(s_sourceRouter.getWrappedNative(), OWNER); + s_tokenAdminRegistry.acceptAdminRole(s_sourceRouter.getWrappedNative()); + s_tokenAdminRegistry.proposeAdministrator(CUSTOM_TOKEN, OWNER); + s_tokenAdminRegistry.acceptAdminRole(CUSTOM_TOKEN); + + // LockReleaseTokenPool wrappedNativePool = new LockReleaseTokenPool( + // IERC20(s_sourceRouter.getWrappedNative()), new address[](0), address(s_mockRMN), true, address(s_sourceRouter) + // ); + + // TokenPool.ChainUpdate[] memory wrappedNativeChainUpdate = new TokenPool.ChainUpdate[](1); + // wrappedNativeChainUpdate[0] = TokenPool.ChainUpdate({ + // remoteChainSelector: DEST_CHAIN_SELECTOR, + // remotePoolAddress: abi.encode(s_destTokenPool), + // remoteTokenAddress: abi.encode(s_destToken), + // allowed: true, + // outboundRateLimiterConfig: getOutboundRateLimiterConfig(), + // inboundRateLimiterConfig: getInboundRateLimiterConfig() + // }); + // wrappedNativePool.applyChainUpdates(wrappedNativeChainUpdate); + // s_tokenAdminRegistry.setPool(s_sourceRouter.getWrappedNative(), address(wrappedNativePool)); + + // LockReleaseTokenPool customPool = new LockReleaseTokenPool( + // IERC20(CUSTOM_TOKEN), new address[](0), address(s_mockRMN), true, address(s_sourceRouter) + // ); + // TokenPool.ChainUpdate[] memory customChainUpdate = new TokenPool.ChainUpdate[](1); + // customChainUpdate[0] = TokenPool.ChainUpdate({ + // remoteChainSelector: DEST_CHAIN_SELECTOR, + // remotePoolAddress: abi.encode(s_destTokenPool), + // remoteTokenAddress: abi.encode(s_destToken), + // allowed: true, + // outboundRateLimiterConfig: getOutboundRateLimiterConfig(), + // inboundRateLimiterConfig: getInboundRateLimiterConfig() + // }); + // customPool.applyChainUpdates(customChainUpdate); + // s_tokenAdminRegistry.setPool(CUSTOM_TOKEN, address(customPool)); + + // Ensure the self-serve token is set up on the admin registry + // vm.mockCall( + // address(s_tokenAdminRegistry), + // abi.encodeWithSelector(ITokenAdminRegistry.getPool.selector, s_selfServeTokenDefaultPricing), + // abi.encode(makeAddr("self-serve-pool")) + // ); + } + + function _generateEmptyMessage() public view returns (Client.EVM2AnyMessage memory) { + return Client.EVM2AnyMessage({ + receiver: abi.encode(OWNER), + data: "", + tokenAmounts: new Client.EVMTokenAmount[](0), + feeToken: s_sourceFeeToken, + extraArgs: Client._argsToBytes(Client.EVMExtraArgsV1({gasLimit: GAS_LIMIT})) + }); + } + + function _generateSingleTokenMessage( + address token, + uint256 amount + ) public view returns (Client.EVM2AnyMessage memory) { + Client.EVMTokenAmount[] memory tokenAmounts = new Client.EVMTokenAmount[](1); + tokenAmounts[0] = Client.EVMTokenAmount({token: token, amount: amount}); + + return Client.EVM2AnyMessage({ + receiver: abi.encode(OWNER), + data: "", + tokenAmounts: tokenAmounts, + feeToken: s_sourceFeeToken, + extraArgs: Client._argsToBytes(Client.EVMExtraArgsV1({gasLimit: GAS_LIMIT})) + }); + } + + function calcUSDValueFromTokenAmount(uint224 tokenPrice, uint256 tokenAmount) internal pure returns (uint256) { + return (tokenPrice * tokenAmount) / 1e18; + } + + function applyBpsRatio(uint256 tokenAmount, uint16 ratio) internal pure returns (uint256) { + return (tokenAmount * ratio) / 1e5; + } + + function configUSDCentToWei(uint256 usdCent) internal pure returns (uint256) { + return usdCent * 1e16; + } } contract PriceRegistry_constructor is PriceRegistrySetup { @@ -173,10 +437,37 @@ contract PriceRegistry_constructor is PriceRegistrySetup { tokenPriceFeedUpdates[1] = getSingleTokenPriceFeedUpdateStruct(s_sourceTokens[1], s_dataFeedByToken[s_sourceTokens[1]], 6); - s_priceRegistry = new PriceRegistry(priceUpdaters, feeTokens, uint32(TWELVE_HOURS), tokenPriceFeedUpdates); + vm.expectEmit(); + emit PriceRegistry.PremiumMultiplierWeiPerEthUpdated( + s_priceRegistryPremiumMultiplierWeiPerEthArgs[0].token, + s_priceRegistryPremiumMultiplierWeiPerEthArgs[0].premiumMultiplierWeiPerEth + ); + vm.expectEmit(); + emit PriceRegistry.PremiumMultiplierWeiPerEthUpdated( + s_priceRegistryPremiumMultiplierWeiPerEthArgs[1].token, + s_priceRegistryPremiumMultiplierWeiPerEthArgs[1].premiumMultiplierWeiPerEth + ); + + PriceRegistry.StaticConfig memory staticConfig = PriceRegistry.StaticConfig({ + linkToken: s_sourceTokens[0], + maxFeeJuelsPerMsg: MAX_MSG_FEES_JUELS, + stalenessThreshold: uint32(TWELVE_HOURS) + }); + s_priceRegistry = new PriceRegistryHelper( + staticConfig, + priceUpdaters, + feeTokens, + tokenPriceFeedUpdates, + s_priceRegistryTokenTransferFeeConfigArgs, + s_priceRegistryPremiumMultiplierWeiPerEthArgs, + _generatePriceRegistryDestChainDynamicConfigArgs() + ); + + // TODO: assert dynamicConfig equality + // TODO: assert tokenTransferFeeConfigArgs (emit events) + _assertPriceRegistryStaticConfigsEqual(s_priceRegistry.getStaticConfig(), staticConfig); assertEq(feeTokens, s_priceRegistry.getFeeTokens()); - assertEq(uint32(TWELVE_HOURS), s_priceRegistry.getStalenessThreshold()); assertEq(priceUpdaters, s_priceRegistry.getAllAuthorizedCallers()); assertEq(s_priceRegistry.typeAndVersion(), "PriceRegistry 1.6.0-dev"); @@ -187,13 +478,53 @@ contract PriceRegistry_constructor is PriceRegistrySetup { _assertTokenPriceFeedConfigEquality( tokenPriceFeedUpdates[1].feedConfig, s_priceRegistry.getTokenPriceFeedConfig(s_sourceTokens[1]) ); - } - function test_InvalidStalenessThreshold_Revert() public { - vm.expectRevert(PriceRegistry.InvalidStalenessThreshold.selector); - s_priceRegistry = - new PriceRegistry(new address[](0), new address[](0), 0, new PriceRegistry.TokenPriceFeedUpdate[](0)); + uint64 gotFeeTokenConfig0 = + s_priceRegistry.getPremiumMultiplierWeiPerEth(s_priceRegistryPremiumMultiplierWeiPerEthArgs[0].token); + assertEq(s_priceRegistryPremiumMultiplierWeiPerEthArgs[0].premiumMultiplierWeiPerEth, gotFeeTokenConfig0); + + uint64 gotFeeTokenConfig1 = + s_priceRegistry.getPremiumMultiplierWeiPerEth(s_priceRegistryPremiumMultiplierWeiPerEthArgs[1].token); + assertEq(s_priceRegistryPremiumMultiplierWeiPerEthArgs[1].premiumMultiplierWeiPerEth, gotFeeTokenConfig1); + + PriceRegistry.TokenTransferFeeConfigArgs memory tokenTransferFeeConfigArg = + s_priceRegistryTokenTransferFeeConfigArgs[0]; + for (uint256 i = 0; i < tokenTransferFeeConfigArg.tokenTransferFeeConfigs.length; ++i) { + PriceRegistry.TokenTransferFeeConfigSingleTokenArgs memory tokenFeeArgs = + s_priceRegistryTokenTransferFeeConfigArgs[0].tokenTransferFeeConfigs[i]; + + _assertTokenTransferFeeConfigEqual( + tokenFeeArgs.tokenTransferFeeConfig, + s_priceRegistry.getTokenTransferFeeConfig(tokenTransferFeeConfigArg.destChainSelector, tokenFeeArgs.token) + ); + } } + + // TODO: re-add test + // function test_InvalidStalenessThreshold_Revert() public { + // vm.expectRevert(PriceRegistry.InvalidStalenessThreshold.selector); + // s_priceRegistry = + // new PriceRegistryHelper(new address[](0), new address[](0), 0, new PriceRegistry.TokenPriceFeedUpdate[](0)); + // } + + // TODO: re-add test + // function test_Constructor_InvalidConfigLinkTokenEqAddressZero_Revert() public { + // vm.expectRevert(EVM2EVMMultiOnRamp.InvalidConfig.selector); + // new EVM2EVMMultiOnRampHelper( + // EVM2EVMMultiOnRamp.StaticConfig({ + // linkToken: address(0), + // chainSelector: SOURCE_CHAIN_SELECTOR, + // maxFeeJuelsPerMsg: MAX_NOP_FEES_JUELS, + // rmnProxy: address(s_mockRMN), + // nonceManager: address(s_outboundNonceManager), + // tokenAdminRegistry: address(s_tokenAdminRegistry) + // }), + // _generateDynamicMultiOnRampConfig(address(s_sourceRouter), address(s_priceRegistry)), + // _generateDestChainConfigArgs(), + // s_premiumMultiplierWeiPerEthArgs, + // s_tokenTransferFeeConfigArgs + // ); + // } } contract PriceRegistry_getTokenPrices is PriceRegistrySetup { @@ -782,3 +1113,1394 @@ contract PriceRegistry_updateTokenPriceFeeds is PriceRegistrySetup { s_priceRegistry.updateTokenPriceFeeds(tokenPriceFeedUpdates); } } + +// TODO: add dest chain config tests +// contract EVM2EVMMultiOnRamp_applyDestChainConfigUpdates is EVM2EVMMultiOnRampSetup { +// function test_Fuzz_applyDestChainConfigUpdates_Success( +// EVM2EVMMultiOnRamp.DestChainConfigArgs memory destChainConfigArgs +// ) public { +// vm.assume(destChainConfigArgs.destChainSelector != 0); +// vm.assume(destChainConfigArgs.dynamicConfig.defaultTxGasLimit != 0); +// destChainConfigArgs.dynamicConfig.defaultTokenDestBytesOverhead = uint32( +// bound( +// destChainConfigArgs.dynamicConfig.defaultTokenDestBytesOverhead, +// Pool.CCIP_LOCK_OR_BURN_V1_RET_BYTES, +// type(uint32).max +// ) +// ); +// destChainConfigArgs.dynamicConfig.chainFamilySelector = Internal.CHAIN_FAMILY_SELECTOR_EVM; + +// bool isNewChain = true; + +// if (destChainConfigArgs.destChainSelector == DEST_CHAIN_SELECTOR) { +// destChainConfigArgs.prevOnRamp = address(0); +// isNewChain = false; +// } +// EVM2EVMMultiOnRamp.DestChainConfigArgs[] memory newDestChainConfigArgs = +// new EVM2EVMMultiOnRamp.DestChainConfigArgs[](1); +// newDestChainConfigArgs[0] = destChainConfigArgs; +// EVM2EVMMultiOnRamp.DestChainConfig memory expectedDestChainConfig = EVM2EVMMultiOnRamp.DestChainConfig({ +// dynamicConfig: destChainConfigArgs.dynamicConfig, +// prevOnRamp: destChainConfigArgs.prevOnRamp, +// sequenceNumber: 0, +// metadataHash: keccak256( +// abi.encode( +// Internal.EVM_2_ANY_MESSAGE_HASH, SOURCE_CHAIN_SELECTOR, destChainConfigArgs.destChainSelector, address(s_onRamp) +// ) +// ) +// }); + +// if (isNewChain) { +// vm.expectEmit(); +// emit EVM2EVMMultiOnRamp.DestChainAdded(destChainConfigArgs.destChainSelector, expectedDestChainConfig); +// } else { +// vm.expectEmit(); +// emit EVM2EVMMultiOnRamp.DestChainDynamicConfigUpdated( +// destChainConfigArgs.destChainSelector, expectedDestChainConfig.dynamicConfig +// ); +// } + +// s_onRamp.applyDestChainConfigUpdates(newDestChainConfigArgs); + +// _assertDestChainConfigsEqual( +// expectedDestChainConfig, s_onRamp.getDestChainConfig(destChainConfigArgs.destChainSelector) +// ); +// } + +// function test_applyDestChainConfigUpdates_Success() public { +// EVM2EVMMultiOnRamp.DestChainConfigArgs[] memory destChainConfigArgs = +// new EVM2EVMMultiOnRamp.DestChainConfigArgs[](2); +// destChainConfigArgs[0] = _generateDestChainConfigArgs()[0]; +// destChainConfigArgs[0].dynamicConfig.isEnabled = false; +// destChainConfigArgs[1] = _generateDestChainConfigArgs()[0]; +// destChainConfigArgs[1].destChainSelector = DEST_CHAIN_SELECTOR + 1; + +// EVM2EVMMultiOnRamp.DestChainConfig memory expectedDestChainConfig0 = EVM2EVMMultiOnRamp.DestChainConfig({ +// dynamicConfig: destChainConfigArgs[0].dynamicConfig, +// prevOnRamp: address(0), +// sequenceNumber: 0, +// metadataHash: keccak256( +// abi.encode( +// Internal.EVM_2_ANY_MESSAGE_HASH, +// SOURCE_CHAIN_SELECTOR, +// destChainConfigArgs[0].destChainSelector, +// address(s_onRamp) +// ) +// ) +// }); + +// EVM2EVMMultiOnRamp.DestChainConfig memory expectedDestChainConfig1 = EVM2EVMMultiOnRamp.DestChainConfig({ +// dynamicConfig: destChainConfigArgs[1].dynamicConfig, +// prevOnRamp: address(0), +// sequenceNumber: 0, +// metadataHash: keccak256( +// abi.encode( +// Internal.EVM_2_ANY_MESSAGE_HASH, +// SOURCE_CHAIN_SELECTOR, +// destChainConfigArgs[1].destChainSelector, +// address(s_onRamp) +// ) +// ) +// }); + +// vm.expectEmit(); +// emit EVM2EVMMultiOnRamp.DestChainDynamicConfigUpdated(DEST_CHAIN_SELECTOR, expectedDestChainConfig0.dynamicConfig); +// vm.expectEmit(); +// emit EVM2EVMMultiOnRamp.DestChainAdded(DEST_CHAIN_SELECTOR + 1, expectedDestChainConfig1); + +// vm.recordLogs(); +// s_onRamp.applyDestChainConfigUpdates(destChainConfigArgs); + +// EVM2EVMMultiOnRamp.DestChainConfig memory gotDestChainConfig0 = s_onRamp.getDestChainConfig(DEST_CHAIN_SELECTOR); +// EVM2EVMMultiOnRamp.DestChainConfig memory gotDestChainConfig1 = s_onRamp.getDestChainConfig(DEST_CHAIN_SELECTOR + 1); + +// assertEq(vm.getRecordedLogs().length, 2); +// _assertDestChainConfigsEqual(expectedDestChainConfig0, gotDestChainConfig0); +// _assertDestChainConfigsEqual(expectedDestChainConfig1, gotDestChainConfig1); +// } + +// function test_applyDestChainConfigUpdatesZeroIntput() public { +// EVM2EVMMultiOnRamp.DestChainConfigArgs[] memory destChainConfigArgs = +// new EVM2EVMMultiOnRamp.DestChainConfigArgs[](0); + +// vm.recordLogs(); +// s_onRamp.applyDestChainConfigUpdates(destChainConfigArgs); + +// assertEq(vm.getRecordedLogs().length, 0); +// } + +// // Reverts + +// function test_InvalidDestChainConfigDestChainSelectorEqZero_Revert() public { +// EVM2EVMMultiOnRamp.DestChainConfigArgs[] memory destChainConfigArgs = _generateDestChainConfigArgs(); +// EVM2EVMMultiOnRamp.DestChainConfigArgs memory destChainConfigArg = destChainConfigArgs[0]; + +// destChainConfigArg.destChainSelector = 0; +// vm.expectRevert( +// abi.encodeWithSelector(EVM2EVMMultiOnRamp.InvalidDestChainConfig.selector, destChainConfigArg.destChainSelector) +// ); +// s_onRamp.applyDestChainConfigUpdates(destChainConfigArgs); +// } + +// function test_applyDestChainConfigUpdatesDefaultTxGasLimitEqZero_Revert() public { +// EVM2EVMMultiOnRamp.DestChainConfigArgs[] memory destChainConfigArgs = _generateDestChainConfigArgs(); +// EVM2EVMMultiOnRamp.DestChainConfigArgs memory destChainConfigArg = destChainConfigArgs[0]; + +// destChainConfigArg.dynamicConfig.defaultTxGasLimit = 0; +// vm.expectRevert( +// abi.encodeWithSelector(EVM2EVMMultiOnRamp.InvalidDestChainConfig.selector, destChainConfigArg.destChainSelector) +// ); +// s_onRamp.applyDestChainConfigUpdates(destChainConfigArgs); +// } + +// function test_InvalidDestChainConfigNewPrevOnRampOnExistingChain_Revert() public { +// EVM2EVMMultiOnRamp.DestChainConfigArgs[] memory destChainConfigArgs = _generateDestChainConfigArgs(); +// EVM2EVMMultiOnRamp.DestChainConfigArgs memory destChainConfigArg = destChainConfigArgs[0]; + +// destChainConfigArg.prevOnRamp = address(1); +// vm.expectRevert( +// abi.encodeWithSelector(EVM2EVMMultiOnRamp.InvalidDestChainConfig.selector, destChainConfigArg.destChainSelector) +// ); +// s_onRamp.applyDestChainConfigUpdates(destChainConfigArgs); +// } + +// function test_InvalidDestBytesOverhead_Revert() public { +// EVM2EVMMultiOnRamp.DestChainConfigArgs[] memory destChainConfigArgs = _generateDestChainConfigArgs(); +// EVM2EVMMultiOnRamp.DestChainConfigArgs memory destChainConfigArg = destChainConfigArgs[0]; + +// destChainConfigArg.dynamicConfig.defaultTokenDestBytesOverhead = uint32(Pool.CCIP_LOCK_OR_BURN_V1_RET_BYTES - 1); + +// vm.expectRevert( +// abi.encodeWithSelector( +// EVM2EVMMultiOnRamp.InvalidDestBytesOverhead.selector, +// address(0), +// destChainConfigArg.dynamicConfig.defaultTokenDestBytesOverhead +// ) +// ); + +// s_onRamp.applyDestChainConfigUpdates(destChainConfigArgs); +// } + +// function test_InvalidChainFamilySelector_Revert() public { +// EVM2EVMMultiOnRamp.DestChainConfigArgs[] memory destChainConfigArgs = _generateDestChainConfigArgs(); +// EVM2EVMMultiOnRamp.DestChainConfigArgs memory destChainConfigArg = destChainConfigArgs[0]; + +// destChainConfigArg.dynamicConfig.chainFamilySelector = bytes4(uint32(1)); + +// vm.expectRevert( +// abi.encodeWithSelector(EVM2EVMMultiOnRamp.InvalidDestChainConfig.selector, destChainConfigArg.destChainSelector) +// ); +// s_onRamp.applyDestChainConfigUpdates(destChainConfigArgs); +// } +// } + +contract PriceRegistry_getDataAvailabilityCost is PriceRegistrySetup { + function test_EmptyMessageCalculatesDataAvailabilityCost_Success() public { + uint256 dataAvailabilityCostUSD = + s_priceRegistry.getDataAvailabilityCost(DEST_CHAIN_SELECTOR, USD_PER_DATA_AVAILABILITY_GAS, 0, 0, 0); + + PriceRegistry.DestChainDynamicConfig memory destChainDynamicConfig = + s_priceRegistry.getDestChainDynamicConfig(DEST_CHAIN_SELECTOR); + + uint256 dataAvailabilityGas = destChainDynamicConfig.destDataAvailabilityOverheadGas + + destChainDynamicConfig.destGasPerDataAvailabilityByte * Internal.ANY_2_EVM_MESSAGE_FIXED_BYTES; + uint256 expectedDataAvailabilityCostUSD = USD_PER_DATA_AVAILABILITY_GAS * dataAvailabilityGas + * destChainDynamicConfig.destDataAvailabilityMultiplierBps * 1e14; + + assertEq(expectedDataAvailabilityCostUSD, dataAvailabilityCostUSD); + + // Test that the cost is destnation chain specific + PriceRegistry.DestChainDynamicConfigArgs[] memory destChainConfigArgs = + _generatePriceRegistryDestChainDynamicConfigArgs(); + destChainConfigArgs[0].destChainSelector = DEST_CHAIN_SELECTOR + 1; + destChainConfigArgs[0].dynamicConfig.destDataAvailabilityOverheadGas = + destChainDynamicConfig.destDataAvailabilityOverheadGas * 2; + destChainConfigArgs[0].dynamicConfig.destGasPerDataAvailabilityByte = + destChainDynamicConfig.destGasPerDataAvailabilityByte * 2; + destChainConfigArgs[0].dynamicConfig.destDataAvailabilityMultiplierBps = + destChainDynamicConfig.destDataAvailabilityMultiplierBps * 2; + s_priceRegistry.applyDestChainConfigUpdates(destChainConfigArgs); + + destChainDynamicConfig = s_priceRegistry.getDestChainDynamicConfig(DEST_CHAIN_SELECTOR + 1); + uint256 dataAvailabilityCostUSD2 = + s_priceRegistry.getDataAvailabilityCost(DEST_CHAIN_SELECTOR + 1, USD_PER_DATA_AVAILABILITY_GAS, 0, 0, 0); + dataAvailabilityGas = destChainDynamicConfig.destDataAvailabilityOverheadGas + + destChainDynamicConfig.destGasPerDataAvailabilityByte * Internal.ANY_2_EVM_MESSAGE_FIXED_BYTES; + expectedDataAvailabilityCostUSD = USD_PER_DATA_AVAILABILITY_GAS * dataAvailabilityGas + * destChainDynamicConfig.destDataAvailabilityMultiplierBps * 1e14; + + assertEq(expectedDataAvailabilityCostUSD, dataAvailabilityCostUSD2); + assertFalse(dataAvailabilityCostUSD == dataAvailabilityCostUSD2); + } + + function test_SimpleMessageCalculatesDataAvailabilityCost_Success() public view { + uint256 dataAvailabilityCostUSD = + s_priceRegistry.getDataAvailabilityCost(DEST_CHAIN_SELECTOR, USD_PER_DATA_AVAILABILITY_GAS, 100, 5, 50); + + PriceRegistry.DestChainDynamicConfig memory destChainDynamicConfig = + s_priceRegistry.getDestChainDynamicConfig(DEST_CHAIN_SELECTOR); + + uint256 dataAvailabilityLengthBytes = + Internal.ANY_2_EVM_MESSAGE_FIXED_BYTES + 100 + (5 * Internal.ANY_2_EVM_MESSAGE_FIXED_BYTES_PER_TOKEN) + 50; + uint256 dataAvailabilityGas = destChainDynamicConfig.destDataAvailabilityOverheadGas + + destChainDynamicConfig.destGasPerDataAvailabilityByte * dataAvailabilityLengthBytes; + uint256 expectedDataAvailabilityCostUSD = USD_PER_DATA_AVAILABILITY_GAS * dataAvailabilityGas + * destChainDynamicConfig.destDataAvailabilityMultiplierBps * 1e14; + + assertEq(expectedDataAvailabilityCostUSD, dataAvailabilityCostUSD); + } + + function test_SimpleMessageCalculatesDataAvailabilityCostUnsupportedDestChainSelector_Success() public view { + uint256 dataAvailabilityCostUSD = + s_priceRegistry.getDataAvailabilityCost(0, USD_PER_DATA_AVAILABILITY_GAS, 100, 5, 50); + + assertEq(dataAvailabilityCostUSD, 0); + } + + function test_Fuzz_ZeroDataAvailabilityGasPriceAlwaysCalculatesZeroDataAvailabilityCost_Success( + uint64 messageDataLength, + uint32 numberOfTokens, + uint32 tokenTransferBytesOverhead + ) public view { + uint256 dataAvailabilityCostUSD = s_priceRegistry.getDataAvailabilityCost( + DEST_CHAIN_SELECTOR, 0, messageDataLength, numberOfTokens, tokenTransferBytesOverhead + ); + + assertEq(0, dataAvailabilityCostUSD); + } + + function test_Fuzz_CalculateDataAvailabilityCost_Success( + uint64 destChainSelector, + uint32 destDataAvailabilityOverheadGas, + uint16 destGasPerDataAvailabilityByte, + uint16 destDataAvailabilityMultiplierBps, + uint112 dataAvailabilityGasPrice, + uint64 messageDataLength, + uint32 numberOfTokens, + uint32 tokenTransferBytesOverhead + ) public { + vm.assume(destChainSelector != 0); + PriceRegistry.DestChainDynamicConfigArgs[] memory destChainConfigArgs = + new PriceRegistry.DestChainDynamicConfigArgs[](1); + PriceRegistry.DestChainDynamicConfig memory destChainConfig = + s_priceRegistry.getDestChainDynamicConfig(destChainSelector); + destChainConfigArgs[0] = + PriceRegistry.DestChainDynamicConfigArgs({destChainSelector: destChainSelector, dynamicConfig: destChainConfig}); + destChainConfigArgs[0].dynamicConfig.destDataAvailabilityOverheadGas = destDataAvailabilityOverheadGas; + destChainConfigArgs[0].dynamicConfig.destGasPerDataAvailabilityByte = destGasPerDataAvailabilityByte; + destChainConfigArgs[0].dynamicConfig.destDataAvailabilityMultiplierBps = destDataAvailabilityMultiplierBps; + destChainConfigArgs[0].dynamicConfig.defaultTxGasLimit = GAS_LIMIT; + destChainConfigArgs[0].dynamicConfig.chainFamilySelector = Internal.CHAIN_FAMILY_SELECTOR_EVM; + destChainConfigArgs[0].dynamicConfig.defaultTokenDestBytesOverhead = DEFAULT_TOKEN_BYTES_OVERHEAD; + + s_priceRegistry.applyDestChainConfigUpdates(destChainConfigArgs); + + uint256 dataAvailabilityCostUSD = s_priceRegistry.getDataAvailabilityCost( + destChainConfigArgs[0].destChainSelector, + dataAvailabilityGasPrice, + messageDataLength, + numberOfTokens, + tokenTransferBytesOverhead + ); + + uint256 dataAvailabilityLengthBytes = Internal.ANY_2_EVM_MESSAGE_FIXED_BYTES + messageDataLength + + (numberOfTokens * Internal.ANY_2_EVM_MESSAGE_FIXED_BYTES_PER_TOKEN) + tokenTransferBytesOverhead; + + uint256 dataAvailabilityGas = + destDataAvailabilityOverheadGas + destGasPerDataAvailabilityByte * dataAvailabilityLengthBytes; + uint256 expectedDataAvailabilityCostUSD = + dataAvailabilityGasPrice * dataAvailabilityGas * destDataAvailabilityMultiplierBps * 1e14; + + assertEq(expectedDataAvailabilityCostUSD, dataAvailabilityCostUSD); + } +} + +contract PriceRegistry_applyPremiumMultiplierWeiPerEthUpdates is PriceRegistrySetup { + function test_Fuzz_applyPremiumMultiplierWeiPerEthUpdates_Success( + PriceRegistry.PremiumMultiplierWeiPerEthArgs memory premiumMultiplierWeiPerEthArg + ) public { + PriceRegistry.PremiumMultiplierWeiPerEthArgs[] memory premiumMultiplierWeiPerEthArgs = + new PriceRegistry.PremiumMultiplierWeiPerEthArgs[](1); + premiumMultiplierWeiPerEthArgs[0] = premiumMultiplierWeiPerEthArg; + + vm.expectEmit(); + emit PriceRegistry.PremiumMultiplierWeiPerEthUpdated( + premiumMultiplierWeiPerEthArg.token, premiumMultiplierWeiPerEthArg.premiumMultiplierWeiPerEth + ); + + s_priceRegistry.applyPremiumMultiplierWeiPerEthUpdates(premiumMultiplierWeiPerEthArgs); + + assertEq( + premiumMultiplierWeiPerEthArg.premiumMultiplierWeiPerEth, + s_priceRegistry.getPremiumMultiplierWeiPerEth(premiumMultiplierWeiPerEthArg.token) + ); + } + + function test_applyPremiumMultiplierWeiPerEthUpdatesSingleToken_Success() public { + PriceRegistry.PremiumMultiplierWeiPerEthArgs[] memory premiumMultiplierWeiPerEthArgs = + new PriceRegistry.PremiumMultiplierWeiPerEthArgs[](1); + premiumMultiplierWeiPerEthArgs[0] = s_priceRegistryPremiumMultiplierWeiPerEthArgs[0]; + premiumMultiplierWeiPerEthArgs[0].token = vm.addr(1); + + vm.expectEmit(); + emit PriceRegistry.PremiumMultiplierWeiPerEthUpdated( + vm.addr(1), premiumMultiplierWeiPerEthArgs[0].premiumMultiplierWeiPerEth + ); + + s_priceRegistry.applyPremiumMultiplierWeiPerEthUpdates(premiumMultiplierWeiPerEthArgs); + + assertEq( + s_priceRegistryPremiumMultiplierWeiPerEthArgs[0].premiumMultiplierWeiPerEth, + s_priceRegistry.getPremiumMultiplierWeiPerEth(vm.addr(1)) + ); + } + + function test_applyPremiumMultiplierWeiPerEthUpdatesMultipleTokens_Success() public { + PriceRegistry.PremiumMultiplierWeiPerEthArgs[] memory premiumMultiplierWeiPerEthArgs = + new PriceRegistry.PremiumMultiplierWeiPerEthArgs[](2); + premiumMultiplierWeiPerEthArgs[0] = s_priceRegistryPremiumMultiplierWeiPerEthArgs[0]; + premiumMultiplierWeiPerEthArgs[0].token = vm.addr(1); + premiumMultiplierWeiPerEthArgs[1].token = vm.addr(2); + + vm.expectEmit(); + emit PriceRegistry.PremiumMultiplierWeiPerEthUpdated( + vm.addr(1), premiumMultiplierWeiPerEthArgs[0].premiumMultiplierWeiPerEth + ); + vm.expectEmit(); + emit PriceRegistry.PremiumMultiplierWeiPerEthUpdated( + vm.addr(2), premiumMultiplierWeiPerEthArgs[1].premiumMultiplierWeiPerEth + ); + + s_priceRegistry.applyPremiumMultiplierWeiPerEthUpdates(premiumMultiplierWeiPerEthArgs); + + assertEq( + premiumMultiplierWeiPerEthArgs[0].premiumMultiplierWeiPerEth, + s_priceRegistry.getPremiumMultiplierWeiPerEth(vm.addr(1)) + ); + assertEq( + premiumMultiplierWeiPerEthArgs[1].premiumMultiplierWeiPerEth, + s_priceRegistry.getPremiumMultiplierWeiPerEth(vm.addr(2)) + ); + } + + function test_applyPremiumMultiplierWeiPerEthUpdatesZeroInput() public { + vm.recordLogs(); + s_priceRegistry.applyPremiumMultiplierWeiPerEthUpdates(new PriceRegistry.PremiumMultiplierWeiPerEthArgs[](0)); + + assertEq(vm.getRecordedLogs().length, 0); + } + + // Reverts + + function test_OnlyCallableByOwnerOrAdmin_Revert() public { + PriceRegistry.PremiumMultiplierWeiPerEthArgs[] memory premiumMultiplierWeiPerEthArgs; + vm.startPrank(STRANGER); + + vm.expectRevert("Only callable by owner"); + + s_priceRegistry.applyPremiumMultiplierWeiPerEthUpdates(premiumMultiplierWeiPerEthArgs); + } +} + +contract PriceRegistry_applyTokenTransferFeeConfigUpdates is PriceRegistrySetup { + function test_Fuzz_ApplyTokenTransferFeeConfig_Success( + PriceRegistry.TokenTransferFeeConfig[2] memory tokenTransferFeeConfigs + ) public { + PriceRegistry.TokenTransferFeeConfigArgs[] memory tokenTransferFeeConfigArgs = + _generateTokenTransferFeeConfigArgs(2, 2); + tokenTransferFeeConfigArgs[0].destChainSelector = DEST_CHAIN_SELECTOR; + tokenTransferFeeConfigArgs[1].destChainSelector = DEST_CHAIN_SELECTOR + 1; + + for (uint256 i = 0; i < tokenTransferFeeConfigArgs.length; ++i) { + for (uint256 j = 0; j < tokenTransferFeeConfigs.length; ++j) { + tokenTransferFeeConfigs[j].destBytesOverhead = uint32( + bound(tokenTransferFeeConfigs[j].destBytesOverhead, Pool.CCIP_LOCK_OR_BURN_V1_RET_BYTES, type(uint32).max) + ); + address feeToken = s_sourceTokens[j]; + tokenTransferFeeConfigArgs[i].tokenTransferFeeConfigs[j].token = feeToken; + tokenTransferFeeConfigArgs[i].tokenTransferFeeConfigs[j].tokenTransferFeeConfig = tokenTransferFeeConfigs[j]; + + vm.expectEmit(); + emit PriceRegistry.TokenTransferFeeConfigUpdated( + tokenTransferFeeConfigArgs[i].destChainSelector, feeToken, tokenTransferFeeConfigs[j] + ); + } + } + + s_priceRegistry.applyTokenTransferFeeConfigUpdates( + tokenTransferFeeConfigArgs, new PriceRegistry.TokenTransferFeeConfigRemoveArgs[](0) + ); + + for (uint256 i = 0; i < tokenTransferFeeConfigs.length; ++i) { + _assertTokenTransferFeeConfigEqual( + tokenTransferFeeConfigs[i], + s_priceRegistry.getTokenTransferFeeConfig( + tokenTransferFeeConfigArgs[0].destChainSelector, + tokenTransferFeeConfigArgs[0].tokenTransferFeeConfigs[i].token + ) + ); + } + } + + function test_ApplyTokenTransferFeeConfig_Success() public { + PriceRegistry.TokenTransferFeeConfigArgs[] memory tokenTransferFeeConfigArgs = + _generateTokenTransferFeeConfigArgs(1, 2); + tokenTransferFeeConfigArgs[0].destChainSelector = DEST_CHAIN_SELECTOR; + tokenTransferFeeConfigArgs[0].tokenTransferFeeConfigs[0].token = address(5); + tokenTransferFeeConfigArgs[0].tokenTransferFeeConfigs[0].tokenTransferFeeConfig = PriceRegistry + .TokenTransferFeeConfig({ + minFeeUSDCents: 6, + maxFeeUSDCents: 7, + deciBps: 8, + destGasOverhead: 9, + destBytesOverhead: 312, + isEnabled: true + }); + tokenTransferFeeConfigArgs[0].tokenTransferFeeConfigs[1].token = address(11); + tokenTransferFeeConfigArgs[0].tokenTransferFeeConfigs[1].tokenTransferFeeConfig = PriceRegistry + .TokenTransferFeeConfig({ + minFeeUSDCents: 12, + maxFeeUSDCents: 13, + deciBps: 14, + destGasOverhead: 15, + destBytesOverhead: 394, + isEnabled: true + }); + + vm.expectEmit(); + emit PriceRegistry.TokenTransferFeeConfigUpdated( + tokenTransferFeeConfigArgs[0].destChainSelector, + tokenTransferFeeConfigArgs[0].tokenTransferFeeConfigs[0].token, + tokenTransferFeeConfigArgs[0].tokenTransferFeeConfigs[0].tokenTransferFeeConfig + ); + vm.expectEmit(); + emit PriceRegistry.TokenTransferFeeConfigUpdated( + tokenTransferFeeConfigArgs[0].destChainSelector, + tokenTransferFeeConfigArgs[0].tokenTransferFeeConfigs[1].token, + tokenTransferFeeConfigArgs[0].tokenTransferFeeConfigs[1].tokenTransferFeeConfig + ); + + PriceRegistry.TokenTransferFeeConfigRemoveArgs[] memory tokensToRemove = + new PriceRegistry.TokenTransferFeeConfigRemoveArgs[](0); + s_priceRegistry.applyTokenTransferFeeConfigUpdates(tokenTransferFeeConfigArgs, tokensToRemove); + + PriceRegistry.TokenTransferFeeConfig memory config0 = s_priceRegistry.getTokenTransferFeeConfig( + tokenTransferFeeConfigArgs[0].destChainSelector, tokenTransferFeeConfigArgs[0].tokenTransferFeeConfigs[0].token + ); + PriceRegistry.TokenTransferFeeConfig memory config1 = s_priceRegistry.getTokenTransferFeeConfig( + tokenTransferFeeConfigArgs[0].destChainSelector, tokenTransferFeeConfigArgs[0].tokenTransferFeeConfigs[1].token + ); + + _assertTokenTransferFeeConfigEqual( + tokenTransferFeeConfigArgs[0].tokenTransferFeeConfigs[0].tokenTransferFeeConfig, config0 + ); + _assertTokenTransferFeeConfigEqual( + tokenTransferFeeConfigArgs[0].tokenTransferFeeConfigs[1].tokenTransferFeeConfig, config1 + ); + + // Remove only the first token and validate only the first token is removed + tokensToRemove = new PriceRegistry.TokenTransferFeeConfigRemoveArgs[](1); + tokensToRemove[0] = PriceRegistry.TokenTransferFeeConfigRemoveArgs({ + destChainSelector: tokenTransferFeeConfigArgs[0].destChainSelector, + token: tokenTransferFeeConfigArgs[0].tokenTransferFeeConfigs[0].token + }); + + vm.expectEmit(); + emit PriceRegistry.TokenTransferFeeConfigDeleted( + tokenTransferFeeConfigArgs[0].destChainSelector, tokenTransferFeeConfigArgs[0].tokenTransferFeeConfigs[0].token + ); + + s_priceRegistry.applyTokenTransferFeeConfigUpdates( + new PriceRegistry.TokenTransferFeeConfigArgs[](0), tokensToRemove + ); + + config0 = s_priceRegistry.getTokenTransferFeeConfig( + tokenTransferFeeConfigArgs[0].destChainSelector, tokenTransferFeeConfigArgs[0].tokenTransferFeeConfigs[0].token + ); + config1 = s_priceRegistry.getTokenTransferFeeConfig( + tokenTransferFeeConfigArgs[0].destChainSelector, tokenTransferFeeConfigArgs[0].tokenTransferFeeConfigs[1].token + ); + + PriceRegistry.TokenTransferFeeConfig memory emptyConfig; + + _assertTokenTransferFeeConfigEqual(emptyConfig, config0); + _assertTokenTransferFeeConfigEqual( + tokenTransferFeeConfigArgs[0].tokenTransferFeeConfigs[1].tokenTransferFeeConfig, config1 + ); + } + + function test_ApplyTokenTransferFeeZeroInput() public { + vm.recordLogs(); + s_priceRegistry.applyTokenTransferFeeConfigUpdates( + new PriceRegistry.TokenTransferFeeConfigArgs[](0), new PriceRegistry.TokenTransferFeeConfigRemoveArgs[](0) + ); + + assertEq(vm.getRecordedLogs().length, 0); + } + + // Reverts + + function test_OnlyCallableByOwnerOrAdmin_Revert() public { + vm.startPrank(STRANGER); + PriceRegistry.TokenTransferFeeConfigArgs[] memory tokenTransferFeeConfigArgs; + + vm.expectRevert("Only callable by owner"); + + s_priceRegistry.applyTokenTransferFeeConfigUpdates( + tokenTransferFeeConfigArgs, new PriceRegistry.TokenTransferFeeConfigRemoveArgs[](0) + ); + } + + function test_InvalidDestBytesOverhead_Revert() public { + PriceRegistry.TokenTransferFeeConfigArgs[] memory tokenTransferFeeConfigArgs = + _generateTokenTransferFeeConfigArgs(1, 1); + tokenTransferFeeConfigArgs[0].destChainSelector = DEST_CHAIN_SELECTOR; + tokenTransferFeeConfigArgs[0].tokenTransferFeeConfigs[0].token = address(5); + tokenTransferFeeConfigArgs[0].tokenTransferFeeConfigs[0].tokenTransferFeeConfig = PriceRegistry + .TokenTransferFeeConfig({ + minFeeUSDCents: 6, + maxFeeUSDCents: 7, + deciBps: 8, + destGasOverhead: 9, + destBytesOverhead: uint32(Pool.CCIP_LOCK_OR_BURN_V1_RET_BYTES - 1), + isEnabled: true + }); + + vm.expectRevert( + abi.encodeWithSelector( + PriceRegistry.InvalidDestBytesOverhead.selector, + tokenTransferFeeConfigArgs[0].tokenTransferFeeConfigs[0].token, + tokenTransferFeeConfigArgs[0].tokenTransferFeeConfigs[0].tokenTransferFeeConfig.destBytesOverhead + ) + ); + + s_priceRegistry.applyTokenTransferFeeConfigUpdates( + tokenTransferFeeConfigArgs, new PriceRegistry.TokenTransferFeeConfigRemoveArgs[](0) + ); + } +} + +contract PriceRegistry_getTokenTransferCost is PriceRegistryFeeSetup { + using USDPriceWith18Decimals for uint224; + + function test_NoTokenTransferChargesZeroFee_Success() public view { + Client.EVM2AnyMessage memory message = _generateEmptyMessage(); + (uint256 feeUSDWei, uint32 destGasOverhead, uint32 destBytesOverhead) = + s_priceRegistry.getTokenTransferCost(DEST_CHAIN_SELECTOR, message.feeToken, s_feeTokenPrice, message.tokenAmounts); + + assertEq(0, feeUSDWei); + assertEq(0, destGasOverhead); + assertEq(0, destBytesOverhead); + } + + function test_getTokenTransferCost_selfServeUsesDefaults_Success() public view { + Client.EVM2AnyMessage memory message = _generateSingleTokenMessage(s_selfServeTokenDefaultPricing, 1000); + + // Get config to assert it isn't set + PriceRegistry.TokenTransferFeeConfig memory transferFeeConfig = + s_priceRegistry.getTokenTransferFeeConfig(DEST_CHAIN_SELECTOR, message.tokenAmounts[0].token); + + assertFalse(transferFeeConfig.isEnabled); + + (uint256 feeUSDWei, uint32 destGasOverhead, uint32 destBytesOverhead) = + s_priceRegistry.getTokenTransferCost(DEST_CHAIN_SELECTOR, message.feeToken, s_feeTokenPrice, message.tokenAmounts); + + // Assert that the default values are used + assertEq(uint256(DEFAULT_TOKEN_FEE_USD_CENTS) * 1e16, feeUSDWei); + assertEq(DEFAULT_TOKEN_DEST_GAS_OVERHEAD, destGasOverhead); + assertEq(DEFAULT_TOKEN_BYTES_OVERHEAD, destBytesOverhead); + } + + function test_SmallTokenTransferChargesMinFeeAndGas_Success() public view { + Client.EVM2AnyMessage memory message = _generateSingleTokenMessage(s_sourceFeeToken, 1000); + PriceRegistry.TokenTransferFeeConfig memory transferFeeConfig = + s_priceRegistry.getTokenTransferFeeConfig(DEST_CHAIN_SELECTOR, message.tokenAmounts[0].token); + + (uint256 feeUSDWei, uint32 destGasOverhead, uint32 destBytesOverhead) = + s_priceRegistry.getTokenTransferCost(DEST_CHAIN_SELECTOR, message.feeToken, s_feeTokenPrice, message.tokenAmounts); + + assertEq(configUSDCentToWei(transferFeeConfig.minFeeUSDCents), feeUSDWei); + assertEq(transferFeeConfig.destGasOverhead, destGasOverhead); + assertEq(transferFeeConfig.destBytesOverhead, destBytesOverhead); + } + + function test_ZeroAmountTokenTransferChargesMinFeeAndGas_Success() public view { + Client.EVM2AnyMessage memory message = _generateSingleTokenMessage(s_sourceFeeToken, 0); + PriceRegistry.TokenTransferFeeConfig memory transferFeeConfig = + s_priceRegistry.getTokenTransferFeeConfig(DEST_CHAIN_SELECTOR, message.tokenAmounts[0].token); + + (uint256 feeUSDWei, uint32 destGasOverhead, uint32 destBytesOverhead) = + s_priceRegistry.getTokenTransferCost(DEST_CHAIN_SELECTOR, message.feeToken, s_feeTokenPrice, message.tokenAmounts); + + assertEq(configUSDCentToWei(transferFeeConfig.minFeeUSDCents), feeUSDWei); + assertEq(transferFeeConfig.destGasOverhead, destGasOverhead); + assertEq(transferFeeConfig.destBytesOverhead, destBytesOverhead); + } + + function test_LargeTokenTransferChargesMaxFeeAndGas_Success() public view { + Client.EVM2AnyMessage memory message = _generateSingleTokenMessage(s_sourceFeeToken, 1e36); + PriceRegistry.TokenTransferFeeConfig memory transferFeeConfig = + s_priceRegistry.getTokenTransferFeeConfig(DEST_CHAIN_SELECTOR, message.tokenAmounts[0].token); + + (uint256 feeUSDWei, uint32 destGasOverhead, uint32 destBytesOverhead) = + s_priceRegistry.getTokenTransferCost(DEST_CHAIN_SELECTOR, message.feeToken, s_feeTokenPrice, message.tokenAmounts); + + assertEq(configUSDCentToWei(transferFeeConfig.maxFeeUSDCents), feeUSDWei); + assertEq(transferFeeConfig.destGasOverhead, destGasOverhead); + assertEq(transferFeeConfig.destBytesOverhead, destBytesOverhead); + } + + function test_FeeTokenBpsFee_Success() public view { + uint256 tokenAmount = 10000e18; + + Client.EVM2AnyMessage memory message = _generateSingleTokenMessage(s_sourceFeeToken, tokenAmount); + PriceRegistry.TokenTransferFeeConfig memory transferFeeConfig = + s_priceRegistry.getTokenTransferFeeConfig(DEST_CHAIN_SELECTOR, message.tokenAmounts[0].token); + + (uint256 feeUSDWei, uint32 destGasOverhead, uint32 destBytesOverhead) = + s_priceRegistry.getTokenTransferCost(DEST_CHAIN_SELECTOR, message.feeToken, s_feeTokenPrice, message.tokenAmounts); + + uint256 usdWei = calcUSDValueFromTokenAmount(s_feeTokenPrice, tokenAmount); + uint256 bpsUSDWei = applyBpsRatio( + usdWei, s_priceRegistryTokenTransferFeeConfigArgs[0].tokenTransferFeeConfigs[0].tokenTransferFeeConfig.deciBps + ); + + assertEq(bpsUSDWei, feeUSDWei); + assertEq(transferFeeConfig.destGasOverhead, destGasOverhead); + assertEq(transferFeeConfig.destBytesOverhead, destBytesOverhead); + } + + function test_WETHTokenBpsFee_Success() public view { + uint256 tokenAmount = 100e18; + + Client.EVM2AnyMessage memory message = Client.EVM2AnyMessage({ + receiver: abi.encode(OWNER), + data: "", + tokenAmounts: new Client.EVMTokenAmount[](1), + feeToken: s_sourceRouter.getWrappedNative(), + extraArgs: Client._argsToBytes(Client.EVMExtraArgsV1({gasLimit: GAS_LIMIT})) + }); + message.tokenAmounts[0] = Client.EVMTokenAmount({token: s_sourceRouter.getWrappedNative(), amount: tokenAmount}); + + PriceRegistry.TokenTransferFeeConfig memory transferFeeConfig = + s_priceRegistry.getTokenTransferFeeConfig(DEST_CHAIN_SELECTOR, message.tokenAmounts[0].token); + + (uint256 feeUSDWei, uint32 destGasOverhead, uint32 destBytesOverhead) = s_priceRegistry.getTokenTransferCost( + DEST_CHAIN_SELECTOR, message.feeToken, s_wrappedTokenPrice, message.tokenAmounts + ); + + uint256 usdWei = calcUSDValueFromTokenAmount(s_wrappedTokenPrice, tokenAmount); + uint256 bpsUSDWei = applyBpsRatio( + usdWei, s_priceRegistryTokenTransferFeeConfigArgs[0].tokenTransferFeeConfigs[1].tokenTransferFeeConfig.deciBps + ); + + assertEq(bpsUSDWei, feeUSDWei); + assertEq(transferFeeConfig.destGasOverhead, destGasOverhead); + assertEq(transferFeeConfig.destBytesOverhead, destBytesOverhead); + } + + function test_CustomTokenBpsFee_Success() public view { + uint256 tokenAmount = 200000e18; + + Client.EVM2AnyMessage memory message = Client.EVM2AnyMessage({ + receiver: abi.encode(OWNER), + data: "", + tokenAmounts: new Client.EVMTokenAmount[](1), + feeToken: s_sourceFeeToken, + extraArgs: Client._argsToBytes(Client.EVMExtraArgsV1({gasLimit: GAS_LIMIT})) + }); + message.tokenAmounts[0] = Client.EVMTokenAmount({token: CUSTOM_TOKEN, amount: tokenAmount}); + + PriceRegistry.TokenTransferFeeConfig memory transferFeeConfig = + s_priceRegistry.getTokenTransferFeeConfig(DEST_CHAIN_SELECTOR, message.tokenAmounts[0].token); + + (uint256 feeUSDWei, uint32 destGasOverhead, uint32 destBytesOverhead) = + s_priceRegistry.getTokenTransferCost(DEST_CHAIN_SELECTOR, message.feeToken, s_feeTokenPrice, message.tokenAmounts); + + uint256 usdWei = calcUSDValueFromTokenAmount(s_customTokenPrice, tokenAmount); + uint256 bpsUSDWei = applyBpsRatio( + usdWei, s_priceRegistryTokenTransferFeeConfigArgs[0].tokenTransferFeeConfigs[2].tokenTransferFeeConfig.deciBps + ); + + assertEq(bpsUSDWei, feeUSDWei); + assertEq(transferFeeConfig.destGasOverhead, destGasOverhead); + assertEq(transferFeeConfig.destBytesOverhead, destBytesOverhead); + } + + function test_ZeroFeeConfigChargesMinFee_Success() public { + PriceRegistry.TokenTransferFeeConfigArgs[] memory tokenTransferFeeConfigArgs = + _generateTokenTransferFeeConfigArgs(1, 1); + tokenTransferFeeConfigArgs[0].destChainSelector = DEST_CHAIN_SELECTOR; + tokenTransferFeeConfigArgs[0].tokenTransferFeeConfigs[0].token = s_sourceFeeToken; + tokenTransferFeeConfigArgs[0].tokenTransferFeeConfigs[0].tokenTransferFeeConfig = PriceRegistry + .TokenTransferFeeConfig({ + minFeeUSDCents: 1, + maxFeeUSDCents: 0, + deciBps: 0, + destGasOverhead: 0, + destBytesOverhead: uint32(Pool.CCIP_LOCK_OR_BURN_V1_RET_BYTES), + isEnabled: true + }); + s_priceRegistry.applyTokenTransferFeeConfigUpdates( + tokenTransferFeeConfigArgs, new PriceRegistry.TokenTransferFeeConfigRemoveArgs[](0) + ); + + Client.EVM2AnyMessage memory message = _generateSingleTokenMessage(s_sourceFeeToken, 1e36); + (uint256 feeUSDWei, uint32 destGasOverhead, uint32 destBytesOverhead) = + s_priceRegistry.getTokenTransferCost(DEST_CHAIN_SELECTOR, message.feeToken, s_feeTokenPrice, message.tokenAmounts); + + // if token charges 0 bps, it should cost minFee to transfer + assertEq( + configUSDCentToWei(tokenTransferFeeConfigArgs[0].tokenTransferFeeConfigs[0].tokenTransferFeeConfig.minFeeUSDCents), + feeUSDWei + ); + assertEq(0, destGasOverhead); + assertEq(Pool.CCIP_LOCK_OR_BURN_V1_RET_BYTES, destBytesOverhead); + } + + function test_Fuzz_TokenTransferFeeDuplicateTokens_Success(uint256 transfers, uint256 amount) public view { + // It shouldn't be possible to pay materially lower fees by splitting up the transfers. + // Note it is possible to pay higher fees since the minimum fees are added. + PriceRegistry.DestChainDynamicConfig memory dynamicConfig = + s_priceRegistry.getDestChainDynamicConfig(DEST_CHAIN_SELECTOR); + transfers = bound(transfers, 1, dynamicConfig.maxNumberOfTokensPerMsg); + // Cap amount to avoid overflow + amount = bound(amount, 0, 1e36); + Client.EVMTokenAmount[] memory multiple = new Client.EVMTokenAmount[](transfers); + for (uint256 i = 0; i < transfers; ++i) { + multiple[i] = Client.EVMTokenAmount({token: s_sourceTokens[0], amount: amount}); + } + Client.EVMTokenAmount[] memory single = new Client.EVMTokenAmount[](1); + single[0] = Client.EVMTokenAmount({token: s_sourceTokens[0], amount: amount * transfers}); + + address feeToken = s_sourceRouter.getWrappedNative(); + + (uint256 feeSingleUSDWei, uint32 gasOverheadSingle, uint32 bytesOverheadSingle) = + s_priceRegistry.getTokenTransferCost(DEST_CHAIN_SELECTOR, feeToken, s_wrappedTokenPrice, single); + (uint256 feeMultipleUSDWei, uint32 gasOverheadMultiple, uint32 bytesOverheadMultiple) = + s_priceRegistry.getTokenTransferCost(DEST_CHAIN_SELECTOR, feeToken, s_wrappedTokenPrice, multiple); + + // Note that there can be a rounding error once per split. + assertGe(feeMultipleUSDWei, (feeSingleUSDWei - dynamicConfig.maxNumberOfTokensPerMsg)); + assertEq(gasOverheadMultiple, gasOverheadSingle * transfers); + assertEq(bytesOverheadMultiple, bytesOverheadSingle * transfers); + } + + function test_MixedTokenTransferFee_Success() public view { + address[3] memory testTokens = [s_sourceFeeToken, s_sourceRouter.getWrappedNative(), CUSTOM_TOKEN]; + uint224[3] memory tokenPrices = [s_feeTokenPrice, s_wrappedTokenPrice, s_customTokenPrice]; + PriceRegistry.TokenTransferFeeConfig[3] memory tokenTransferFeeConfigs = [ + s_priceRegistry.getTokenTransferFeeConfig(DEST_CHAIN_SELECTOR, testTokens[0]), + s_priceRegistry.getTokenTransferFeeConfig(DEST_CHAIN_SELECTOR, testTokens[1]), + s_priceRegistry.getTokenTransferFeeConfig(DEST_CHAIN_SELECTOR, testTokens[2]) + ]; + + Client.EVM2AnyMessage memory message = Client.EVM2AnyMessage({ + receiver: abi.encode(OWNER), + data: "", + tokenAmounts: new Client.EVMTokenAmount[](3), + feeToken: s_sourceRouter.getWrappedNative(), + extraArgs: Client._argsToBytes(Client.EVMExtraArgsV1({gasLimit: GAS_LIMIT})) + }); + uint256 expectedTotalGas = 0; + uint256 expectedTotalBytes = 0; + + // Start with small token transfers, total bps fee is lower than min token transfer fee + for (uint256 i = 0; i < testTokens.length; ++i) { + message.tokenAmounts[i] = Client.EVMTokenAmount({token: testTokens[i], amount: 1e14}); + expectedTotalGas += s_priceRegistry.getTokenTransferFeeConfig(DEST_CHAIN_SELECTOR, testTokens[i]).destGasOverhead; + expectedTotalBytes += + s_priceRegistry.getTokenTransferFeeConfig(DEST_CHAIN_SELECTOR, testTokens[i]).destBytesOverhead; + } + (uint256 feeUSDWei, uint32 destGasOverhead, uint32 destBytesOverhead) = s_priceRegistry.getTokenTransferCost( + DEST_CHAIN_SELECTOR, message.feeToken, s_wrappedTokenPrice, message.tokenAmounts + ); + + uint256 expectedFeeUSDWei = 0; + for (uint256 i = 0; i < testTokens.length; ++i) { + expectedFeeUSDWei += configUSDCentToWei(tokenTransferFeeConfigs[i].minFeeUSDCents); + } + + assertEq(expectedFeeUSDWei, feeUSDWei); + assertEq(expectedTotalGas, destGasOverhead); + assertEq(expectedTotalBytes, destBytesOverhead); + + // Set 1st token transfer to a meaningful amount so its bps fee is now between min and max fee + message.tokenAmounts[0] = Client.EVMTokenAmount({token: testTokens[0], amount: 10000e18}); + + (feeUSDWei, destGasOverhead, destBytesOverhead) = s_priceRegistry.getTokenTransferCost( + DEST_CHAIN_SELECTOR, message.feeToken, s_wrappedTokenPrice, message.tokenAmounts + ); + expectedFeeUSDWei = applyBpsRatio( + calcUSDValueFromTokenAmount(tokenPrices[0], message.tokenAmounts[0].amount), tokenTransferFeeConfigs[0].deciBps + ); + expectedFeeUSDWei += configUSDCentToWei(tokenTransferFeeConfigs[1].minFeeUSDCents); + expectedFeeUSDWei += configUSDCentToWei(tokenTransferFeeConfigs[2].minFeeUSDCents); + + assertEq(expectedFeeUSDWei, feeUSDWei); + assertEq(expectedTotalGas, destGasOverhead); + assertEq(expectedTotalBytes, destBytesOverhead); + + // Set 2nd token transfer to a large amount that is higher than maxFeeUSD + message.tokenAmounts[1] = Client.EVMTokenAmount({token: testTokens[1], amount: 1e36}); + + (feeUSDWei, destGasOverhead, destBytesOverhead) = s_priceRegistry.getTokenTransferCost( + DEST_CHAIN_SELECTOR, message.feeToken, s_wrappedTokenPrice, message.tokenAmounts + ); + expectedFeeUSDWei = applyBpsRatio( + calcUSDValueFromTokenAmount(tokenPrices[0], message.tokenAmounts[0].amount), tokenTransferFeeConfigs[0].deciBps + ); + expectedFeeUSDWei += configUSDCentToWei(tokenTransferFeeConfigs[1].maxFeeUSDCents); + expectedFeeUSDWei += configUSDCentToWei(tokenTransferFeeConfigs[2].minFeeUSDCents); + + assertEq(expectedFeeUSDWei, feeUSDWei); + assertEq(expectedTotalGas, destGasOverhead); + assertEq(expectedTotalBytes, destBytesOverhead); + } +} + +contract PriceRegistry_validateDestFamilyAddress is PriceRegistrySetup { + function test_ValidEVMAddress_Success() public view { + bytes memory encodedAddress = abi.encode(address(10000)); + s_priceRegistry.validateDestFamilyAddress(Internal.CHAIN_FAMILY_SELECTOR_EVM, encodedAddress); + } + + function test_ValidNonEVMAddress_Success() public view { + s_priceRegistry.validateDestFamilyAddress(bytes4(uint32(1)), abi.encode(type(uint208).max)); + } + + // Reverts + + function test_InvalidEVMAddress_Revert() public { + bytes memory invalidAddress = abi.encode(type(uint208).max); + vm.expectRevert(abi.encodeWithSelector(Internal.InvalidEVMAddress.selector, invalidAddress)); + s_priceRegistry.validateDestFamilyAddress(Internal.CHAIN_FAMILY_SELECTOR_EVM, invalidAddress); + } +} + +contract PriceRegistry_parseEVMExtraArgsFromBytes is PriceRegistrySetup { + PriceRegistry.DestChainDynamicConfig private s_destChainDynamicConfig; + + function setUp() public virtual override { + super.setUp(); + s_destChainDynamicConfig = _generatePriceRegistryDestChainDynamicConfigArgs()[0].dynamicConfig; + } + + function test_EVMExtraArgsV1_Success() public view { + Client.EVMExtraArgsV1 memory inputArgs = Client.EVMExtraArgsV1({gasLimit: GAS_LIMIT}); + bytes memory inputExtraArgs = Client._argsToBytes(inputArgs); + Client.EVMExtraArgsV2 memory expectedOutputArgs = + Client.EVMExtraArgsV2({gasLimit: GAS_LIMIT, allowOutOfOrderExecution: false}); + + vm.assertEq( + abi.encode(s_priceRegistry.parseEVMExtraArgsFromBytes(inputExtraArgs, s_destChainDynamicConfig)), + abi.encode(expectedOutputArgs) + ); + } + + function test_EVMExtraArgsV2_Success() public view { + Client.EVMExtraArgsV2 memory inputArgs = + Client.EVMExtraArgsV2({gasLimit: GAS_LIMIT, allowOutOfOrderExecution: true}); + bytes memory inputExtraArgs = Client._argsToBytes(inputArgs); + + vm.assertEq( + abi.encode(s_priceRegistry.parseEVMExtraArgsFromBytes(inputExtraArgs, s_destChainDynamicConfig)), + abi.encode(inputArgs) + ); + } + + function test_EVMExtraArgsDefault_Success() public view { + Client.EVMExtraArgsV2 memory expectedOutputArgs = + Client.EVMExtraArgsV2({gasLimit: s_destChainDynamicConfig.defaultTxGasLimit, allowOutOfOrderExecution: false}); + + vm.assertEq( + abi.encode(s_priceRegistry.parseEVMExtraArgsFromBytes("", s_destChainDynamicConfig)), + abi.encode(expectedOutputArgs) + ); + } + + // Reverts + + function test_EVMExtraArgsInvalidExtraArgsTag_Revert() public { + Client.EVMExtraArgsV2 memory inputArgs = + Client.EVMExtraArgsV2({gasLimit: GAS_LIMIT, allowOutOfOrderExecution: true}); + bytes memory inputExtraArgs = Client._argsToBytes(inputArgs); + // Invalidate selector + inputExtraArgs[0] = bytes1(uint8(0)); + + vm.expectRevert(PriceRegistry.InvalidExtraArgsTag.selector); + s_priceRegistry.parseEVMExtraArgsFromBytes(inputExtraArgs, s_destChainDynamicConfig); + } + + function test_EVMExtraArgsEnforceOutOfOrder_Revert() public { + Client.EVMExtraArgsV2 memory inputArgs = + Client.EVMExtraArgsV2({gasLimit: GAS_LIMIT, allowOutOfOrderExecution: false}); + bytes memory inputExtraArgs = Client._argsToBytes(inputArgs); + s_destChainDynamicConfig.enforceOutOfOrder = true; + + vm.expectRevert(PriceRegistry.ExtraArgOutOfOrderExecutionMustBeTrue.selector); + s_priceRegistry.parseEVMExtraArgsFromBytes(inputExtraArgs, s_destChainDynamicConfig); + } + + function test_EVMExtraArgsGasLimitTooHigh_Revert() public { + Client.EVMExtraArgsV2 memory inputArgs = + Client.EVMExtraArgsV2({gasLimit: s_destChainDynamicConfig.maxPerMsgGasLimit + 1, allowOutOfOrderExecution: true}); + bytes memory inputExtraArgs = Client._argsToBytes(inputArgs); + + vm.expectRevert(PriceRegistry.MessageGasLimitTooHigh.selector); + s_priceRegistry.parseEVMExtraArgsFromBytes(inputExtraArgs, s_destChainDynamicConfig); + } +} + +// TODO: add validation tests (revisit placing them back to MultiOnRamp tests) +// { +// function test_Fuzz_EnforceOutOfOrder(bool enforce, bool allowOutOfOrderExecution) public { +// // Update dynamic config to enforce allowOutOfOrderExecution = defaultVal. +// vm.stopPrank(); +// vm.startPrank(OWNER); + +// EVM2EVMMultiOnRamp.DestChainConfigArgs[] memory destChainConfigArgs = _generateDestChainConfigArgs(); +// destChainConfigArgs[0].dynamicConfig.enforceOutOfOrder = enforce; +// s_onRamp.applyDestChainConfigUpdates(destChainConfigArgs); + +// vm.stopPrank(); + +// vm.startPrank(address(s_sourceRouter)); +// Client.EVM2AnyMessage memory message = _generateEmptyMessage(); +// message.extraArgs = abi.encodeWithSelector( +// Client.EVM_EXTRA_ARGS_V2_TAG, +// Client.EVMExtraArgsV2({gasLimit: GAS_LIMIT * 2, allowOutOfOrderExecution: allowOutOfOrderExecution}) +// ); +// uint256 feeAmount = 1234567890; +// IERC20(s_sourceFeeToken).transferFrom(OWNER, address(s_onRamp), feeAmount); + +// if (enforce) { +// // If enforcement is on, only true should be allowed. +// if (allowOutOfOrderExecution) { +// vm.expectEmit(); +// emit EVM2EVMMultiOnRamp.CCIPSendRequested(DEST_CHAIN_SELECTOR, _messageToEvent(message, 1, 1, feeAmount, OWNER)); +// s_onRamp.forwardFromRouter(DEST_CHAIN_SELECTOR, message, feeAmount, OWNER); +// } else { +// vm.expectRevert(EVM2EVMMultiOnRamp.ExtraArgOutOfOrderExecutionMustBeTrue.selector); +// s_onRamp.forwardFromRouter(DEST_CHAIN_SELECTOR, message, feeAmount, OWNER); +// } +// } else { +// // no enforcement should allow any value. +// vm.expectEmit(); +// emit EVM2EVMMultiOnRamp.CCIPSendRequested(DEST_CHAIN_SELECTOR, _messageToEvent(message, 1, 1, feeAmount, OWNER)); +// s_onRamp.forwardFromRouter(DEST_CHAIN_SELECTOR, message, feeAmount, OWNER); +// } +// } + +// function test_MessageTooLarge_Revert() public { +// Client.EVM2AnyMessage memory message = _generateEmptyMessage(); +// message.data = new bytes(MAX_DATA_SIZE + 1); +// vm.expectRevert( +// abi.encodeWithSelector(EVM2EVMMultiOnRamp.MessageTooLarge.selector, MAX_DATA_SIZE, message.data.length) +// ); + +// s_onRamp.forwardFromRouter(DEST_CHAIN_SELECTOR, message, 0, STRANGER); +// } + +// function test_TooManyTokens_Revert() public { +// Client.EVM2AnyMessage memory message = _generateEmptyMessage(); +// uint256 tooMany = MAX_TOKENS_LENGTH + 1; +// message.tokenAmounts = new Client.EVMTokenAmount[](tooMany); +// vm.expectRevert(EVM2EVMMultiOnRamp.UnsupportedNumberOfTokens.selector); +// s_onRamp.forwardFromRouter(DEST_CHAIN_SELECTOR, message, 0, STRANGER); +// } + +// Asserts gasLimit must be <=maxGasLimit +// function test_MessageGasLimitTooHigh_Revert() public { +// Client.EVM2AnyMessage memory message = _generateEmptyMessage(); +// message.extraArgs = Client._argsToBytes(Client.EVMExtraArgsV1({gasLimit: MAX_GAS_LIMIT + 1})); +// vm.expectRevert(abi.encodeWithSelector(EVM2EVMMultiOnRamp.MessageGasLimitTooHigh.selector)); +// s_onRamp.forwardFromRouter(DEST_CHAIN_SELECTOR, message, 0, OWNER); +// } + +// function test_InvalidAddressEncodePacked_Revert() public { +// Client.EVM2AnyMessage memory message = _generateEmptyMessage(); +// message.receiver = abi.encodePacked(address(234)); + +// vm.expectRevert(abi.encodeWithSelector(Internal.InvalidEVMAddress.selector, message.receiver)); + +// s_onRamp.forwardFromRouter(DEST_CHAIN_SELECTOR, message, 1, OWNER); +// } + +// function test_InvalidEVMAddress_Revert() public { +// Client.EVM2AnyMessage memory message = _generateEmptyMessage(); +// message.receiver = abi.encode(type(uint208).max); + +// vm.expectRevert(abi.encodeWithSelector(Internal.InvalidEVMAddress.selector, message.receiver)); + +// s_onRamp.forwardFromRouter(DEST_CHAIN_SELECTOR, message, 1, OWNER); +// } + +// // We disallow sending to addresses 0-9. +// function test_ZeroAddressReceiver_Revert() public { +// Client.EVM2AnyMessage memory message = _generateEmptyMessage(); + +// for (uint160 i = 0; i < 10; ++i) { +// message.receiver = abi.encode(address(i)); + +// vm.expectRevert(abi.encodeWithSelector(Internal.InvalidEVMAddress.selector, message.receiver)); + +// s_onRamp.forwardFromRouter(DEST_CHAIN_SELECTOR, message, 1, OWNER); +// } +// } + +// function test_MesssageFeeTooHigh_Revert() public { +// Client.EVM2AnyMessage memory message = _generateEmptyMessage(); + +// vm.expectRevert( +// abi.encodeWithSelector(EVM2EVMMultiOnRamp.MessageFeeTooHigh.selector, MAX_MSG_FEES_JUELS + 1, MAX_MSG_FEES_JUELS) +// ); + +// s_onRamp.forwardFromRouter(DEST_CHAIN_SELECTOR, message, MAX_MSG_FEES_JUELS + 1, OWNER); +// } + +// function test_SourceTokenDataTooLarge_Revert() public { +// address sourceETH = s_sourceTokens[1]; +// vm.stopPrank(); +// vm.startPrank(OWNER); + +// MaybeRevertingBurnMintTokenPool newPool = new MaybeRevertingBurnMintTokenPool( +// BurnMintERC677(sourceETH), new address[](0), address(s_mockRMN), address(s_sourceRouter) +// ); +// BurnMintERC677(sourceETH).grantMintAndBurnRoles(address(newPool)); +// deal(address(sourceETH), address(newPool), type(uint256).max); + +// // Add TokenPool to OnRamp +// s_tokenAdminRegistry.setPool(sourceETH, address(newPool)); + +// // Allow chain in TokenPool +// TokenPool.ChainUpdate[] memory chainUpdates = new TokenPool.ChainUpdate[](1); +// chainUpdates[0] = TokenPool.ChainUpdate({ +// remoteChainSelector: DEST_CHAIN_SELECTOR, +// remotePoolAddress: abi.encode(s_destTokenPool), +// remoteTokenAddress: abi.encode(s_destToken), +// allowed: true, +// outboundRateLimiterConfig: getOutboundRateLimiterConfig(), +// inboundRateLimiterConfig: getInboundRateLimiterConfig() +// }); +// newPool.applyChainUpdates(chainUpdates); + +// Client.EVM2AnyMessage memory message = _generateSingleTokenMessage(address(sourceETH), 1000); + +// // No data set, should succeed +// vm.startPrank(address(s_sourceRouter)); +// s_onRamp.forwardFromRouter(DEST_CHAIN_SELECTOR, message, 0, OWNER); + +// // Set max data length, should succeed +// vm.startPrank(OWNER); +// newPool.setSourceTokenData(new bytes(Pool.CCIP_LOCK_OR_BURN_V1_RET_BYTES)); + +// vm.startPrank(address(s_sourceRouter)); +// s_onRamp.forwardFromRouter(DEST_CHAIN_SELECTOR, message, 0, OWNER); + +// // Set data to max length +1, should revert +// vm.startPrank(OWNER); +// newPool.setSourceTokenData(new bytes(Pool.CCIP_LOCK_OR_BURN_V1_RET_BYTES + 1)); + +// vm.startPrank(address(s_sourceRouter)); +// vm.expectRevert(abi.encodeWithSelector(EVM2EVMMultiOnRamp.SourceTokenDataTooLarge.selector, sourceETH)); +// s_onRamp.forwardFromRouter(DEST_CHAIN_SELECTOR, message, 0, OWNER); + +// // Set token config to allow larger data +// vm.startPrank(OWNER); +// EVM2EVMMultiOnRamp.TokenTransferFeeConfigArgs[] memory tokenTransferFeeConfigArgs = +// _generateTokenTransferFeeConfigArgs(1, 1); +// tokenTransferFeeConfigArgs[0].destChainSelector = DEST_CHAIN_SELECTOR; +// tokenTransferFeeConfigArgs[0].tokenTransferFeeConfigs[0].token = sourceETH; +// tokenTransferFeeConfigArgs[0].tokenTransferFeeConfigs[0].tokenTransferFeeConfig = EVM2EVMMultiOnRamp +// .TokenTransferFeeConfig({ +// minFeeUSDCents: 1, +// maxFeeUSDCents: 0, +// deciBps: 0, +// destGasOverhead: 0, +// destBytesOverhead: uint32(Pool.CCIP_LOCK_OR_BURN_V1_RET_BYTES) + 32, +// isEnabled: true +// }); +// s_onRamp.applyTokenTransferFeeConfigUpdates( +// tokenTransferFeeConfigArgs, new EVM2EVMMultiOnRamp.TokenTransferFeeConfigRemoveArgs[](0) +// ); + +// vm.startPrank(address(s_sourceRouter)); +// s_onRamp.forwardFromRouter(DEST_CHAIN_SELECTOR, message, 0, OWNER); + +// // Set the token data larger than the configured token data, should revert +// vm.startPrank(OWNER); +// newPool.setSourceTokenData(new bytes(uint32(Pool.CCIP_LOCK_OR_BURN_V1_RET_BYTES) + 32 + 1)); + +// vm.startPrank(address(s_sourceRouter)); +// vm.expectRevert(abi.encodeWithSelector(EVM2EVMMultiOnRamp.SourceTokenDataTooLarge.selector, sourceETH)); +// s_onRamp.forwardFromRouter(DEST_CHAIN_SELECTOR, message, 0, OWNER); +// } + +// function test_InvalidEVMAddressDestToken_Revert() public { +// address sourceETH = s_sourceTokens[1]; +// vm.stopPrank(); +// vm.startPrank(OWNER); + +// MaybeRevertingBurnMintTokenPool newPool = new MaybeRevertingBurnMintTokenPool( +// BurnMintERC677(sourceETH), new address[](0), address(s_mockRMN), address(s_sourceRouter) +// ); +// BurnMintERC677(sourceETH).grantMintAndBurnRoles(address(newPool)); +// deal(address(sourceETH), address(newPool), type(uint256).max); + +// // Add TokenPool to OnRamp +// s_tokenAdminRegistry.setPool(sourceETH, address(newPool)); + +// bytes memory nonEvmAddress = abi.encode(type(uint208).max); + +// // Allow chain in TokenPool +// TokenPool.ChainUpdate[] memory chainUpdates = new TokenPool.ChainUpdate[](1); +// chainUpdates[0] = TokenPool.ChainUpdate({ +// remoteChainSelector: DEST_CHAIN_SELECTOR, +// remotePoolAddress: abi.encode(s_destTokenPool), +// remoteTokenAddress: nonEvmAddress, +// allowed: true, +// outboundRateLimiterConfig: getOutboundRateLimiterConfig(), +// inboundRateLimiterConfig: getInboundRateLimiterConfig() +// }); +// newPool.applyChainUpdates(chainUpdates); + +// Client.EVM2AnyMessage memory message = _generateSingleTokenMessage(address(sourceETH), 1000); + +// vm.startPrank(address(s_sourceRouter)); +// vm.expectRevert(abi.encodeWithSelector(Internal.InvalidEVMAddress.selector, nonEvmAddress)); +// s_onRamp.forwardFromRouter(DEST_CHAIN_SELECTOR, message, 0, OWNER); +// } + +// function test_EnforceOutOfOrder_Revert() public { +// // Update dynamic config to enforce allowOutOfOrderExecution = true. +// vm.stopPrank(); +// vm.startPrank(OWNER); + +// EVM2EVMMultiOnRamp.DestChainConfigArgs[] memory destChainConfigArgs = _generateDestChainConfigArgs(); +// destChainConfigArgs[0].dynamicConfig.enforceOutOfOrder = true; +// s_onRamp.applyDestChainConfigUpdates(destChainConfigArgs); +// vm.stopPrank(); + +// vm.startPrank(address(s_sourceRouter)); +// Client.EVM2AnyMessage memory message = _generateEmptyMessage(); +// // Empty extraArgs to should revert since it enforceOutOfOrder is true. +// message.extraArgs = ""; +// uint256 feeAmount = 1234567890; +// IERC20(s_sourceFeeToken).transferFrom(OWNER, address(s_onRamp), feeAmount); + +// vm.expectRevert(EVM2EVMMultiOnRamp.ExtraArgOutOfOrderExecutionMustBeTrue.selector); +// s_onRamp.forwardFromRouter(DEST_CHAIN_SELECTOR, message, feeAmount, OWNER); +// } +// } + +// TODO: getValidatedFee +// { +// function test_EmptyMessage_Success() public view { +// address[2] memory testTokens = [s_sourceFeeToken, s_sourceRouter.getWrappedNative()]; +// uint224[2] memory feeTokenPrices = [s_feeTokenPrice, s_wrappedTokenPrice]; + +// for (uint256 i = 0; i < feeTokenPrices.length; ++i) { +// Client.EVM2AnyMessage memory message = _generateEmptyMessage(); +// message.feeToken = testTokens[i]; +// uint64 premiumMultiplierWeiPerEth = s_priceRegistry.getPremiumMultiplierWeiPerEth(message.feeToken); +// PriceRegistry.DestChainDynamicConfig memory destChainDynamicConfig = +// s_priceRegistry.getDestChainConfig(DEST_CHAIN_SELECTOR); + +// uint256 feeAmount = s_onRamp.getFee(DEST_CHAIN_SELECTOR, message); + +// uint256 gasUsed = GAS_LIMIT + DEST_GAS_OVERHEAD; +// uint256 gasFeeUSD = (gasUsed * destChainDynamicConfig.gasMultiplierWeiPerEth * USD_PER_GAS); +// uint256 messageFeeUSD = +// (configUSDCentToWei(destChainDynamicConfig.networkFeeUSDCents) * premiumMultiplierWeiPerEth); +// uint256 dataAvailabilityFeeUSD = s_priceRegistry.getDataAvailabilityCost( +// DEST_CHAIN_SELECTOR, USD_PER_DATA_AVAILABILITY_GAS, message.data.length, message.tokenAmounts.length, 0 +// ); + +// uint256 totalPriceInFeeToken = (gasFeeUSD + messageFeeUSD + dataAvailabilityFeeUSD) / feeTokenPrices[i]; +// assertEq(totalPriceInFeeToken, feeAmount); +// } +// } + +// function test_ZeroDataAvailabilityMultiplier_Success() public { +// EVM2EVMMultiOnRamp.DestChainConfigArgs[] memory destChainConfigArgs = +// new EVM2EVMMultiOnRamp.DestChainConfigArgs[](1); +// EVM2EVMMultiOnRamp.DestChainConfig memory destChainConfig = s_onRamp.getDestChainConfig(DEST_CHAIN_SELECTOR); +// destChainConfigArgs[0] = EVM2EVMMultiOnRamp.DestChainConfigArgs({ +// destChainSelector: DEST_CHAIN_SELECTOR, +// dynamicConfig: destChainConfig.dynamicConfig, +// prevOnRamp: destChainConfig.prevOnRamp +// }); +// destChainConfigArgs[0].dynamicConfig.destDataAvailabilityMultiplierBps = 0; +// s_onRamp.applyDestChainConfigUpdates(destChainConfigArgs); + +// Client.EVM2AnyMessage memory message = _generateEmptyMessage(); +// uint64 premiumMultiplierWeiPerEth = s_onRamp.getPremiumMultiplierWeiPerEth(message.feeToken); +// EVM2EVMMultiOnRamp.DestChainDynamicConfig memory destChainDynamicConfig = +// s_onRamp.getDestChainConfig(DEST_CHAIN_SELECTOR).dynamicConfig; + +// uint256 feeAmount = s_onRamp.getFee(DEST_CHAIN_SELECTOR, message); + +// uint256 gasUsed = GAS_LIMIT + DEST_GAS_OVERHEAD; +// uint256 gasFeeUSD = (gasUsed * destChainDynamicConfig.gasMultiplierWeiPerEth * USD_PER_GAS); +// uint256 messageFeeUSD = (configUSDCentToWei(destChainDynamicConfig.networkFeeUSDCents) * premiumMultiplierWeiPerEth); + +// uint256 totalPriceInFeeToken = (gasFeeUSD + messageFeeUSD) / s_feeTokenPrice; +// assertEq(totalPriceInFeeToken, feeAmount); +// } + +// function test_HighGasMessage_Success() public view { +// address[2] memory testTokens = [s_sourceFeeToken, s_sourceRouter.getWrappedNative()]; +// uint224[2] memory feeTokenPrices = [s_feeTokenPrice, s_wrappedTokenPrice]; + +// uint256 customGasLimit = MAX_GAS_LIMIT; +// uint256 customDataSize = MAX_DATA_SIZE; +// for (uint256 i = 0; i < feeTokenPrices.length; ++i) { +// Client.EVM2AnyMessage memory message = Client.EVM2AnyMessage({ +// receiver: abi.encode(OWNER), +// data: new bytes(customDataSize), +// tokenAmounts: new Client.EVMTokenAmount[](0), +// feeToken: testTokens[i], +// extraArgs: Client._argsToBytes(Client.EVMExtraArgsV1({gasLimit: customGasLimit})) +// }); + +// uint64 premiumMultiplierWeiPerEth = s_onRamp.getPremiumMultiplierWeiPerEth(message.feeToken); +// EVM2EVMMultiOnRamp.DestChainDynamicConfig memory destChainDynamicConfig = +// s_onRamp.getDestChainConfig(DEST_CHAIN_SELECTOR).dynamicConfig; + +// uint256 feeAmount = s_onRamp.getFee(DEST_CHAIN_SELECTOR, message); +// uint256 gasUsed = customGasLimit + DEST_GAS_OVERHEAD + customDataSize * DEST_GAS_PER_PAYLOAD_BYTE; +// uint256 gasFeeUSD = (gasUsed * destChainDynamicConfig.gasMultiplierWeiPerEth * USD_PER_GAS); +// uint256 messageFeeUSD = +// (configUSDCentToWei(destChainDynamicConfig.networkFeeUSDCents) * premiumMultiplierWeiPerEth); +// uint256 dataAvailabilityFeeUSD = s_onRamp.getDataAvailabilityCost( +// DEST_CHAIN_SELECTOR, USD_PER_DATA_AVAILABILITY_GAS, message.data.length, message.tokenAmounts.length, 0 +// ); + +// uint256 totalPriceInFeeToken = (gasFeeUSD + messageFeeUSD + dataAvailabilityFeeUSD) / feeTokenPrices[i]; +// assertEq(totalPriceInFeeToken, feeAmount); +// } +// } + +// function test_SingleTokenMessage_Success() public view { +// address[2] memory testTokens = [s_sourceFeeToken, s_sourceRouter.getWrappedNative()]; +// uint224[2] memory feeTokenPrices = [s_feeTokenPrice, s_wrappedTokenPrice]; + +// uint256 tokenAmount = 10000e18; +// for (uint256 i = 0; i < feeTokenPrices.length; ++i) { +// Client.EVM2AnyMessage memory message = _generateSingleTokenMessage(s_sourceFeeToken, tokenAmount); +// message.feeToken = testTokens[i]; +// EVM2EVMMultiOnRamp.DestChainDynamicConfig memory destChainDynamicConfig = +// s_onRamp.getDestChainConfig(DEST_CHAIN_SELECTOR).dynamicConfig; +// uint32 destBytesOverhead = +// s_onRamp.getTokenTransferFeeConfig(DEST_CHAIN_SELECTOR, message.tokenAmounts[0].token).destBytesOverhead; +// uint32 tokenBytesOverhead = +// destBytesOverhead == 0 ? uint32(Pool.CCIP_LOCK_OR_BURN_V1_RET_BYTES) : destBytesOverhead; + +// uint256 feeAmount = s_onRamp.getFee(DEST_CHAIN_SELECTOR, message); + +// uint256 gasUsed = GAS_LIMIT + DEST_GAS_OVERHEAD +// + s_onRamp.getTokenTransferFeeConfig(DEST_CHAIN_SELECTOR, message.tokenAmounts[0].token).destGasOverhead; +// uint256 gasFeeUSD = (gasUsed * destChainDynamicConfig.gasMultiplierWeiPerEth * USD_PER_GAS); +// (uint256 transferFeeUSD,,) = +// s_onRamp.getTokenTransferCost(DEST_CHAIN_SELECTOR, message.feeToken, feeTokenPrices[i], message.tokenAmounts); +// uint256 messageFeeUSD = (transferFeeUSD * s_onRamp.getPremiumMultiplierWeiPerEth(message.feeToken)); +// uint256 dataAvailabilityFeeUSD = s_onRamp.getDataAvailabilityCost( +// DEST_CHAIN_SELECTOR, +// USD_PER_DATA_AVAILABILITY_GAS, +// message.data.length, +// message.tokenAmounts.length, +// tokenBytesOverhead +// ); + +// uint256 totalPriceInFeeToken = (gasFeeUSD + messageFeeUSD + dataAvailabilityFeeUSD) / feeTokenPrices[i]; +// assertEq(totalPriceInFeeToken, feeAmount); +// } +// } + +// function test_MessageWithDataAndTokenTransfer_Success() public view { +// address[2] memory testTokens = [s_sourceFeeToken, s_sourceRouter.getWrappedNative()]; +// uint224[2] memory feeTokenPrices = [s_feeTokenPrice, s_wrappedTokenPrice]; + +// uint256 customGasLimit = 1_000_000; +// for (uint256 i = 0; i < feeTokenPrices.length; ++i) { +// Client.EVM2AnyMessage memory message = Client.EVM2AnyMessage({ +// receiver: abi.encode(OWNER), +// data: "", +// tokenAmounts: new Client.EVMTokenAmount[](2), +// feeToken: testTokens[i], +// extraArgs: Client._argsToBytes(Client.EVMExtraArgsV1({gasLimit: customGasLimit})) +// }); +// uint64 premiumMultiplierWeiPerEth = s_onRamp.getPremiumMultiplierWeiPerEth(message.feeToken); +// EVM2EVMMultiOnRamp.DestChainDynamicConfig memory destChainDynamicConfig = +// s_onRamp.getDestChainConfig(DEST_CHAIN_SELECTOR).dynamicConfig; + +// message.tokenAmounts[0] = Client.EVMTokenAmount({token: s_sourceFeeToken, amount: 10000e18}); // feeTokenAmount +// message.tokenAmounts[1] = Client.EVMTokenAmount({token: CUSTOM_TOKEN, amount: 200000e18}); // customTokenAmount +// message.data = "random bits and bytes that should be factored into the cost of the message"; + +// uint32 tokenGasOverhead = 0; +// uint32 tokenBytesOverhead = 0; +// for (uint256 j = 0; j < message.tokenAmounts.length; ++j) { +// tokenGasOverhead += +// s_onRamp.getTokenTransferFeeConfig(DEST_CHAIN_SELECTOR, message.tokenAmounts[j].token).destGasOverhead; +// uint32 destBytesOverhead = +// s_onRamp.getTokenTransferFeeConfig(DEST_CHAIN_SELECTOR, message.tokenAmounts[j].token).destBytesOverhead; +// tokenBytesOverhead += destBytesOverhead == 0 ? uint32(Pool.CCIP_LOCK_OR_BURN_V1_RET_BYTES) : destBytesOverhead; +// } + +// uint256 gasUsed = +// customGasLimit + DEST_GAS_OVERHEAD + message.data.length * DEST_GAS_PER_PAYLOAD_BYTE + tokenGasOverhead; +// uint256 gasFeeUSD = (gasUsed * destChainDynamicConfig.gasMultiplierWeiPerEth * USD_PER_GAS); +// (uint256 transferFeeUSD,,) = +// s_onRamp.getTokenTransferCost(DEST_CHAIN_SELECTOR, message.feeToken, feeTokenPrices[i], message.tokenAmounts); +// uint256 messageFeeUSD = (transferFeeUSD * premiumMultiplierWeiPerEth); +// uint256 dataAvailabilityFeeUSD = s_onRamp.getDataAvailabilityCost( +// DEST_CHAIN_SELECTOR, +// USD_PER_DATA_AVAILABILITY_GAS, +// message.data.length, +// message.tokenAmounts.length, +// tokenBytesOverhead +// ); + +// uint256 totalPriceInFeeToken = (gasFeeUSD + messageFeeUSD + dataAvailabilityFeeUSD) / feeTokenPrices[i]; +// assertEq(totalPriceInFeeToken, s_onRamp.getFee(DEST_CHAIN_SELECTOR, message)); +// } +// } + +// function test_MessageTooLarge_Revert() public { +// Client.EVM2AnyMessage memory message = _generateEmptyMessage(); +// message.data = new bytes(MAX_DATA_SIZE + 1); +// vm.expectRevert( +// abi.encodeWithSelector(EVM2EVMMultiOnRamp.MessageTooLarge.selector, MAX_DATA_SIZE, message.data.length) +// ); + +// s_onRamp.getFee(DEST_CHAIN_SELECTOR, message); +// } + +// function test_TooManyTokens_Revert() public { +// Client.EVM2AnyMessage memory message = _generateEmptyMessage(); +// uint256 tooMany = MAX_TOKENS_LENGTH + 1; +// message.tokenAmounts = new Client.EVMTokenAmount[](tooMany); +// vm.expectRevert(EVM2EVMMultiOnRamp.UnsupportedNumberOfTokens.selector); +// s_onRamp.getFee(DEST_CHAIN_SELECTOR, message); +// } + +// // Asserts gasLimit must be <=maxGasLimit +// function test_MessageGasLimitTooHigh_Revert() public { +// Client.EVM2AnyMessage memory message = _generateEmptyMessage(); +// message.extraArgs = Client._argsToBytes(Client.EVMExtraArgsV1({gasLimit: MAX_GAS_LIMIT + 1})); +// vm.expectRevert(abi.encodeWithSelector(EVM2EVMMultiOnRamp.MessageGasLimitTooHigh.selector)); +// s_onRamp.getFee(DEST_CHAIN_SELECTOR, message); +// } +// +// function test_NotAFeeToken_Revert() public { +// address notAFeeToken = address(0x111111); +// Client.EVM2AnyMessage memory message = _generateSingleTokenMessage(notAFeeToken, 1); +// message.feeToken = notAFeeToken; + +// vm.expectRevert(abi.encodeWithSelector(EVM2EVMMultiOnRamp.NotAFeeToken.selector, notAFeeToken)); + +// s_onRamp.getFee(DEST_CHAIN_SELECTOR, message); +// } +// } diff --git a/core/gethwrappers/ccip/generated/evm_2_evm_multi_onramp/evm_2_evm_multi_onramp.go b/core/gethwrappers/ccip/generated/evm_2_evm_multi_onramp/evm_2_evm_multi_onramp.go index 66a4769dd7..0422d9e8d8 100644 --- a/core/gethwrappers/ccip/generated/evm_2_evm_multi_onramp/evm_2_evm_multi_onramp.go +++ b/core/gethwrappers/ccip/generated/evm_2_evm_multi_onramp/evm_2_evm_multi_onramp.go @@ -43,37 +43,6 @@ type ClientEVMTokenAmount struct { Amount *big.Int } -type EVM2EVMMultiOnRampDestChainConfig struct { - DynamicConfig EVM2EVMMultiOnRampDestChainDynamicConfig - SequenceNumber uint64 - MetadataHash [32]byte -} - -type EVM2EVMMultiOnRampDestChainConfigArgs struct { - DestChainSelector uint64 - DynamicConfig EVM2EVMMultiOnRampDestChainDynamicConfig -} - -type EVM2EVMMultiOnRampDestChainDynamicConfig struct { - IsEnabled bool - MaxNumberOfTokensPerMsg uint16 - MaxDataBytes uint32 - MaxPerMsgGasLimit uint32 - DestGasOverhead uint32 - DestGasPerPayloadByte uint16 - DestDataAvailabilityOverheadGas uint32 - DestGasPerDataAvailabilityByte uint16 - DestDataAvailabilityMultiplierBps uint16 - DefaultTokenFeeUSDCents uint16 - DefaultTokenDestGasOverhead uint32 - DefaultTokenDestBytesOverhead uint32 - DefaultTxGasLimit uint64 - GasMultiplierWeiPerEth uint64 - NetworkFeeUSDCents uint32 - EnforceOutOfOrder bool - ChainFamilySelector [4]byte -} - type EVM2EVMMultiOnRampDynamicConfig struct { Router common.Address PriceRegistry common.Address @@ -81,44 +50,13 @@ type EVM2EVMMultiOnRampDynamicConfig struct { FeeAggregator common.Address } -type EVM2EVMMultiOnRampPremiumMultiplierWeiPerEthArgs struct { - Token common.Address - PremiumMultiplierWeiPerEth uint64 -} - type EVM2EVMMultiOnRampStaticConfig struct { - LinkToken common.Address ChainSelector uint64 - MaxFeeJuelsPerMsg *big.Int RmnProxy common.Address NonceManager common.Address TokenAdminRegistry common.Address } -type EVM2EVMMultiOnRampTokenTransferFeeConfig struct { - MinFeeUSDCents uint32 - MaxFeeUSDCents uint32 - DeciBps uint16 - DestGasOverhead uint32 - DestBytesOverhead uint32 - IsEnabled bool -} - -type EVM2EVMMultiOnRampTokenTransferFeeConfigArgs struct { - DestChainSelector uint64 - TokenTransferFeeConfigs []EVM2EVMMultiOnRampTokenTransferFeeConfigSingleTokenArgs -} - -type EVM2EVMMultiOnRampTokenTransferFeeConfigRemoveArgs struct { - DestChainSelector uint64 - Token common.Address -} - -type EVM2EVMMultiOnRampTokenTransferFeeConfigSingleTokenArgs struct { - Token common.Address - TokenTransferFeeConfig EVM2EVMMultiOnRampTokenTransferFeeConfig -} - type InternalEVM2AnyRampMessage struct { Header InternalRampMessageHeader Sender common.Address @@ -146,15 +84,15 @@ type InternalRampTokenAmount struct { } var EVM2EVMMultiOnRampMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"linkToken\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"chainSelector\",\"type\":\"uint64\"},{\"internalType\":\"uint96\",\"name\":\"maxFeeJuelsPerMsg\",\"type\":\"uint96\"},{\"internalType\":\"address\",\"name\":\"rmnProxy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"nonceManager\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAdminRegistry\",\"type\":\"address\"}],\"internalType\":\"structEVM2EVMMultiOnRamp.StaticConfig\",\"name\":\"staticConfig\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"priceRegistry\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"messageValidator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"feeAggregator\",\"type\":\"address\"}],\"internalType\":\"structEVM2EVMMultiOnRamp.DynamicConfig\",\"name\":\"dynamicConfig\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint16\",\"name\":\"maxNumberOfTokensPerMsg\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"maxDataBytes\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxPerMsgGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"destGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"destGasPerPayloadByte\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"destDataAvailabilityOverheadGas\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"destGasPerDataAvailabilityByte\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"destDataAvailabilityMultiplierBps\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"defaultTokenFeeUSDCents\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"defaultTokenDestGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"defaultTokenDestBytesOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"defaultTxGasLimit\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"gasMultiplierWeiPerEth\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"networkFeeUSDCents\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"enforceOutOfOrder\",\"type\":\"bool\"},{\"internalType\":\"bytes4\",\"name\":\"chainFamilySelector\",\"type\":\"bytes4\"}],\"internalType\":\"structEVM2EVMMultiOnRamp.DestChainDynamicConfig\",\"name\":\"dynamicConfig\",\"type\":\"tuple\"}],\"internalType\":\"structEVM2EVMMultiOnRamp.DestChainConfigArgs[]\",\"name\":\"destChainConfigArgs\",\"type\":\"tuple[]\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"premiumMultiplierWeiPerEth\",\"type\":\"uint64\"}],\"internalType\":\"structEVM2EVMMultiOnRamp.PremiumMultiplierWeiPerEthArgs[]\",\"name\":\"premiumMultiplierWeiPerEthArgs\",\"type\":\"tuple[]\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"minFeeUSDCents\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxFeeUSDCents\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"deciBps\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"destGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"destBytesOverhead\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"}],\"internalType\":\"structEVM2EVMMultiOnRamp.TokenTransferFeeConfig\",\"name\":\"tokenTransferFeeConfig\",\"type\":\"tuple\"}],\"internalType\":\"structEVM2EVMMultiOnRamp.TokenTransferFeeConfigSingleTokenArgs[]\",\"name\":\"tokenTransferFeeConfigs\",\"type\":\"tuple[]\"}],\"internalType\":\"structEVM2EVMMultiOnRamp.TokenTransferFeeConfigArgs[]\",\"name\":\"tokenTransferFeeConfigArgs\",\"type\":\"tuple[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"CannotSendZeroTokens\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"}],\"name\":\"CursedByRMN\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"}],\"name\":\"DestinationChainNotEnabled\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ExtraArgOutOfOrderExecutionMustBeTrue\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GetSupportedTokensFunctionalityRemovedCheckAdminRegistry\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidConfig\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"destBytesOverhead\",\"type\":\"uint32\"}],\"name\":\"InvalidDestBytesOverhead\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"}],\"name\":\"InvalidDestChainConfig\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"encodedAddress\",\"type\":\"bytes\"}],\"name\":\"InvalidEVMAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidExtraArgsTag\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"msgFeeJuels\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxFeeJuelsPerMsg\",\"type\":\"uint256\"}],\"name\":\"MessageFeeTooHigh\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MessageGasLimitTooHigh\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maxSize\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"actualSize\",\"type\":\"uint256\"}],\"name\":\"MessageTooLarge\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"errorReason\",\"type\":\"bytes\"}],\"name\":\"MessageValidationError\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MustBeCalledByRouter\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"NotAFeeToken\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByOwnerOrAdmin\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RouterMustSetOriginalSender\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"SourceTokenDataTooLarge\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnsupportedNumberOfTokens\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"UnsupportedToken\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"components\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"sequenceNumber\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"nonce\",\"type\":\"uint64\"}],\"internalType\":\"structInternal.RampMessageHeader\",\"name\":\"header\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"receiver\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"extraArgs\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"feeToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"feeTokenAmount\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes\",\"name\":\"sourcePoolAddress\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"destTokenAddress\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"structInternal.RampTokenAmount[]\",\"name\":\"tokenAmounts\",\"type\":\"tuple[]\"}],\"indexed\":false,\"internalType\":\"structInternal.EVM2AnyRampMessage\",\"name\":\"message\",\"type\":\"tuple\"}],\"name\":\"CCIPSendRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"linkToken\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"chainSelector\",\"type\":\"uint64\"},{\"internalType\":\"uint96\",\"name\":\"maxFeeJuelsPerMsg\",\"type\":\"uint96\"},{\"internalType\":\"address\",\"name\":\"rmnProxy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"nonceManager\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAdminRegistry\",\"type\":\"address\"}],\"indexed\":false,\"internalType\":\"structEVM2EVMMultiOnRamp.StaticConfig\",\"name\":\"staticConfig\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"priceRegistry\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"messageValidator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"feeAggregator\",\"type\":\"address\"}],\"indexed\":false,\"internalType\":\"structEVM2EVMMultiOnRamp.DynamicConfig\",\"name\":\"dynamicConfig\",\"type\":\"tuple\"}],\"name\":\"ConfigSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"components\":[{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint16\",\"name\":\"maxNumberOfTokensPerMsg\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"maxDataBytes\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxPerMsgGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"destGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"destGasPerPayloadByte\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"destDataAvailabilityOverheadGas\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"destGasPerDataAvailabilityByte\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"destDataAvailabilityMultiplierBps\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"defaultTokenFeeUSDCents\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"defaultTokenDestGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"defaultTokenDestBytesOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"defaultTxGasLimit\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"gasMultiplierWeiPerEth\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"networkFeeUSDCents\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"enforceOutOfOrder\",\"type\":\"bool\"},{\"internalType\":\"bytes4\",\"name\":\"chainFamilySelector\",\"type\":\"bytes4\"}],\"internalType\":\"structEVM2EVMMultiOnRamp.DestChainDynamicConfig\",\"name\":\"dynamicConfig\",\"type\":\"tuple\"},{\"internalType\":\"uint64\",\"name\":\"sequenceNumber\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"metadataHash\",\"type\":\"bytes32\"}],\"indexed\":false,\"internalType\":\"structEVM2EVMMultiOnRamp.DestChainConfig\",\"name\":\"destChainConfig\",\"type\":\"tuple\"}],\"name\":\"DestChainAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint16\",\"name\":\"maxNumberOfTokensPerMsg\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"maxDataBytes\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxPerMsgGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"destGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"destGasPerPayloadByte\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"destDataAvailabilityOverheadGas\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"destGasPerDataAvailabilityByte\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"destDataAvailabilityMultiplierBps\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"defaultTokenFeeUSDCents\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"defaultTokenDestGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"defaultTokenDestBytesOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"defaultTxGasLimit\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"gasMultiplierWeiPerEth\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"networkFeeUSDCents\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"enforceOutOfOrder\",\"type\":\"bool\"},{\"internalType\":\"bytes4\",\"name\":\"chainFamilySelector\",\"type\":\"bytes4\"}],\"indexed\":false,\"internalType\":\"structEVM2EVMMultiOnRamp.DestChainDynamicConfig\",\"name\":\"dynamicConfig\",\"type\":\"tuple\"}],\"name\":\"DestChainDynamicConfigUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"feeToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"feeValueJuels\",\"type\":\"uint256\"}],\"name\":\"FeePaid\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"feeAggregator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"feeToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"FeeTokenWithdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"premiumMultiplierWeiPerEth\",\"type\":\"uint64\"}],\"name\":\"PremiumMultiplierWeiPerEthUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"TokenTransferFeeConfigDeleted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"minFeeUSDCents\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxFeeUSDCents\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"deciBps\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"destGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"destBytesOverhead\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"}],\"indexed\":false,\"internalType\":\"structEVM2EVMMultiOnRamp.TokenTransferFeeConfig\",\"name\":\"tokenTransferFeeConfig\",\"type\":\"tuple\"}],\"name\":\"TokenTransferFeeConfigUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint16\",\"name\":\"maxNumberOfTokensPerMsg\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"maxDataBytes\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxPerMsgGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"destGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"destGasPerPayloadByte\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"destDataAvailabilityOverheadGas\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"destGasPerDataAvailabilityByte\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"destDataAvailabilityMultiplierBps\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"defaultTokenFeeUSDCents\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"defaultTokenDestGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"defaultTokenDestBytesOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"defaultTxGasLimit\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"gasMultiplierWeiPerEth\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"networkFeeUSDCents\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"enforceOutOfOrder\",\"type\":\"bool\"},{\"internalType\":\"bytes4\",\"name\":\"chainFamilySelector\",\"type\":\"bytes4\"}],\"internalType\":\"structEVM2EVMMultiOnRamp.DestChainDynamicConfig\",\"name\":\"dynamicConfig\",\"type\":\"tuple\"}],\"internalType\":\"structEVM2EVMMultiOnRamp.DestChainConfigArgs[]\",\"name\":\"destChainConfigArgs\",\"type\":\"tuple[]\"}],\"name\":\"applyDestChainConfigUpdates\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"premiumMultiplierWeiPerEth\",\"type\":\"uint64\"}],\"internalType\":\"structEVM2EVMMultiOnRamp.PremiumMultiplierWeiPerEthArgs[]\",\"name\":\"premiumMultiplierWeiPerEthArgs\",\"type\":\"tuple[]\"}],\"name\":\"applyPremiumMultiplierWeiPerEthUpdates\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"minFeeUSDCents\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxFeeUSDCents\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"deciBps\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"destGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"destBytesOverhead\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"}],\"internalType\":\"structEVM2EVMMultiOnRamp.TokenTransferFeeConfig\",\"name\":\"tokenTransferFeeConfig\",\"type\":\"tuple\"}],\"internalType\":\"structEVM2EVMMultiOnRamp.TokenTransferFeeConfigSingleTokenArgs[]\",\"name\":\"tokenTransferFeeConfigs\",\"type\":\"tuple[]\"}],\"internalType\":\"structEVM2EVMMultiOnRamp.TokenTransferFeeConfigArgs[]\",\"name\":\"tokenTransferFeeConfigArgs\",\"type\":\"tuple[]\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"internalType\":\"structEVM2EVMMultiOnRamp.TokenTransferFeeConfigRemoveArgs[]\",\"name\":\"tokensToUseDefaultFeeConfigs\",\"type\":\"tuple[]\"}],\"name\":\"applyTokenTransferFeeConfigUpdates\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"bytes\",\"name\":\"receiver\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"structClient.EVMTokenAmount[]\",\"name\":\"tokenAmounts\",\"type\":\"tuple[]\"},{\"internalType\":\"address\",\"name\":\"feeToken\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"extraArgs\",\"type\":\"bytes\"}],\"internalType\":\"structClient.EVM2AnyMessage\",\"name\":\"message\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"feeTokenAmount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"originalSender\",\"type\":\"address\"}],\"name\":\"forwardFromRouter\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"}],\"name\":\"getDestChainConfig\",\"outputs\":[{\"components\":[{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint16\",\"name\":\"maxNumberOfTokensPerMsg\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"maxDataBytes\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxPerMsgGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"destGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"destGasPerPayloadByte\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"destDataAvailabilityOverheadGas\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"destGasPerDataAvailabilityByte\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"destDataAvailabilityMultiplierBps\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"defaultTokenFeeUSDCents\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"defaultTokenDestGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"defaultTokenDestBytesOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"defaultTxGasLimit\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"gasMultiplierWeiPerEth\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"networkFeeUSDCents\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"enforceOutOfOrder\",\"type\":\"bool\"},{\"internalType\":\"bytes4\",\"name\":\"chainFamilySelector\",\"type\":\"bytes4\"}],\"internalType\":\"structEVM2EVMMultiOnRamp.DestChainDynamicConfig\",\"name\":\"dynamicConfig\",\"type\":\"tuple\"},{\"internalType\":\"uint64\",\"name\":\"sequenceNumber\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"metadataHash\",\"type\":\"bytes32\"}],\"internalType\":\"structEVM2EVMMultiOnRamp.DestChainConfig\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getDynamicConfig\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"priceRegistry\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"messageValidator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"feeAggregator\",\"type\":\"address\"}],\"internalType\":\"structEVM2EVMMultiOnRamp.DynamicConfig\",\"name\":\"dynamicConfig\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"}],\"name\":\"getExpectedNextSequenceNumber\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"bytes\",\"name\":\"receiver\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"structClient.EVMTokenAmount[]\",\"name\":\"tokenAmounts\",\"type\":\"tuple[]\"},{\"internalType\":\"address\",\"name\":\"feeToken\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"extraArgs\",\"type\":\"bytes\"}],\"internalType\":\"structClient.EVM2AnyMessage\",\"name\":\"message\",\"type\":\"tuple\"}],\"name\":\"getFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"feeTokenAmount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"},{\"internalType\":\"contractIERC20\",\"name\":\"sourceToken\",\"type\":\"address\"}],\"name\":\"getPoolBySourceToken\",\"outputs\":[{\"internalType\":\"contractIPoolV1\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"getPremiumMultiplierWeiPerEth\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"premiumMultiplierWeiPerEth\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getStaticConfig\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"linkToken\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"chainSelector\",\"type\":\"uint64\"},{\"internalType\":\"uint96\",\"name\":\"maxFeeJuelsPerMsg\",\"type\":\"uint96\"},{\"internalType\":\"address\",\"name\":\"rmnProxy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"nonceManager\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAdminRegistry\",\"type\":\"address\"}],\"internalType\":\"structEVM2EVMMultiOnRamp.StaticConfig\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"name\":\"getSupportedTokens\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"getTokenTransferFeeConfig\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"minFeeUSDCents\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxFeeUSDCents\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"deciBps\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"destGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"destBytesOverhead\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"}],\"internalType\":\"structEVM2EVMMultiOnRamp.TokenTransferFeeConfig\",\"name\":\"tokenTransferFeeConfig\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"priceRegistry\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"messageValidator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"feeAggregator\",\"type\":\"address\"}],\"internalType\":\"structEVM2EVMMultiOnRamp.DynamicConfig\",\"name\":\"dynamicConfig\",\"type\":\"tuple\"}],\"name\":\"setDynamicConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"typeAndVersion\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdrawFeeTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x6101406040523480156200001257600080fd5b50604051620071bf380380620071bf83398101604081905262000035916200146f565b33806000816200008c5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000bf57620000bf8162000214565b505085516001600160a01b031615905080620000e6575060208501516001600160401b0316155b80620000fd575060608501516001600160a01b0316155b8062000114575060808501516001600160a01b0316155b806200012b575060a08501516001600160a01b0316155b156200014a576040516306b7c75960e31b815260040160405180910390fd5b84516001600160a01b0390811660a090815260208701516001600160401b031660c05260408701516001600160601b031660809081526060880151831660e0528701518216610100528601511661012052620001a684620002bf565b620001b18362000482565b620001bc82620009c9565b60408051600080825260208201909252620002099183919062000202565b6040805180820190915260008082526020820152815260200190600190039081620001da5790505b5062000a95565b5050505050620018be565b336001600160a01b038216036200026e5760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000083565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b60208101516001600160a01b03161580620002e5575060608101516001600160a01b0316155b1562000304576040516306b7c75960e31b815260040160405180910390fd5b8051600280546001600160a01b039283166001600160a01b0319918216179091556020808401516003805491851691841691909117905560408085015160048054918616918516919091179055606080860151600580549187169190951617909355805160c0808201835260a080518716835290516001600160401b031693820193909352608080516001600160601b03168284015260e05186169482019490945261010051851693810193909352610120519093169082015290517f4012fe74115805c44a121d8f9edc3d234df8f05f53b52864b8e5e8a30384b8aa916200047791849082516001600160a01b0390811682526020808501516001600160401b0316818401526040808601516001600160601b03168185015260608087015184168186015260808088015185169086015260a0968701518416968501969096528451831660c085015290840151821660e084015283015181166101008301529190920151166101208201526101400190565b60405180910390a150565b60005b8151811015620009c5576000828281518110620004a657620004a6620015b5565b602002602001015190506000838381518110620004c757620004c7620015b5565b6020026020010151600001519050806001600160401b031660001480620004fe5750602082015161018001516001600160401b0316155b80620005245750602082015161020001516001600160e01b031916630a04b54b60e21b14155b156200054f5760405163c35aa79d60e01b81526001600160401b038216600482015260240162000083565b600060066000836001600160401b03166001600160401b03168152602001908152602001600020905060006040518060600160405280856020015181526020018360020160009054906101000a90046001600160401b03166001600160401b031681526020018360030154815250905080600001518260000160008201518160000160006101000a81548160ff02191690831515021790555060208201518160000160016101000a81548161ffff021916908361ffff16021790555060408201518160000160036101000a81548163ffffffff021916908363ffffffff16021790555060608201518160000160076101000a81548163ffffffff021916908363ffffffff160217905550608082015181600001600b6101000a81548163ffffffff021916908363ffffffff16021790555060a082015181600001600f6101000a81548161ffff021916908361ffff16021790555060c08201518160000160116101000a81548163ffffffff021916908363ffffffff16021790555060e08201518160000160156101000a81548161ffff021916908361ffff1602179055506101008201518160000160176101000a81548161ffff021916908361ffff1602179055506101208201518160000160196101000a81548161ffff021916908361ffff16021790555061014082015181600001601b6101000a81548163ffffffff021916908363ffffffff1602179055506101608201518160010160006101000a81548163ffffffff021916908363ffffffff1602179055506101808201518160010160046101000a8154816001600160401b0302191690836001600160401b031602179055506101a082015181600101600c6101000a8154816001600160401b0302191690836001600160401b031602179055506101c08201518160010160146101000a81548163ffffffff021916908363ffffffff1602179055506101e08201518160010160186101000a81548160ff0219169083151502179055506102008201518160010160196101000a81548163ffffffff021916908360e01c021790555090505081600301546000801b03620009205760c051604080517f130ac867e79e2789f923760a88743d292acdf7002139a588206e2260f73f732160208201526001600160401b0392831691810191909152908416606082015230608082015260a00160408051601f1981840301815291815281516020909201919091208282018190526003840155516001600160401b038416907f26f8c55bd3f591fd6042c98ad4d707257cd565dc47609bfa3ba517400d0570449062000912908590620015cb565b60405180910390a2620009b5565b60208460200151610160015163ffffffff1610156200096d57602084015161016001516040516312766e0160e11b81526000600482015263ffffffff909116602482015260440162000083565b826001600160401b03167fd42d3a670a4f1ab5d8703efa22bb17041446365cfcfa33980ced685a080cf7cb8560200151604051620009ac919062001767565b60405180910390a25b5050505080600101905062000485565b5050565b60005b8151811015620009c5576000828281518110620009ed57620009ed620015b5565b6020026020010151600001519050600083838151811062000a125762000a12620015b5565b6020908102919091018101518101516001600160a01b03841660008181526007845260409081902080546001600160401b0319166001600160401b0385169081179091559051908152919350917fbb77da6f7210cdd16904228a9360133d1d7dfff99b1bc75f128da5b53e28f97d910160405180910390a25050600101620009cc565b60005b825181101562000d0257600083828151811062000ab95762000ab9620015b5565b6020026020010151905060008160000151905060005b82602001515181101562000cf35760008360200151828151811062000af85762000af8620015b5565b602002602001015160200151905060008460200151838151811062000b215762000b21620015b5565b60200260200101516000015190506020826080015163ffffffff16101562000b7a5760808201516040516312766e0160e11b81526001600160a01b038316600482015263ffffffff909116602482015260440162000083565b6001600160401b03841660008181526008602090815260408083206001600160a01b0386168085529083529281902086518154938801518389015160608a015160808b015160a08c01511515600160901b0260ff60901b1963ffffffff928316600160701b021664ffffffffff60701b199383166a01000000000000000000000263ffffffff60501b1961ffff90961668010000000000000000029590951665ffffffffffff60401b19968416640100000000026001600160401b0319909b16939097169290921798909817939093169390931717919091161792909217909155519091907f94967ae9ea7729ad4f54021c1981765d2b1d954f7c92fbec340aa0a54f46b8b59062000ce0908690600060c08201905063ffffffff80845116835280602085015116602084015261ffff60408501511660408401528060608501511660608401528060808501511660808401525060a0830151151560a083015292915050565b60405180910390a3505060010162000acf565b50505080600101905062000a98565b5060005b815181101562000dc857600082828151811062000d275762000d27620015b5565b6020026020010151600001519050600083838151811062000d4c5762000d4c620015b5565b6020908102919091018101518101516001600160401b03841660008181526008845260408082206001600160a01b038516808452955280822080546001600160981b03191690555192945090917f4de5b1bcbca6018c11303a2c3f4a4b4f22a1c741d8c4ba430d246ac06c5ddf8b9190a3505060010162000d06565b505050565b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b038111828210171562000e085762000e0862000dcd565b60405290565b60405161022081016001600160401b038111828210171562000e085762000e0862000dcd565b60405160c081016001600160401b038111828210171562000e085762000e0862000dcd565b604051601f8201601f191681016001600160401b038111828210171562000e845762000e8462000dcd565b604052919050565b80516001600160a01b038116811462000ea457600080fd5b919050565b80516001600160401b038116811462000ea457600080fd5b60006080828403121562000ed457600080fd5b604051608081016001600160401b038111828210171562000ef95762000ef962000dcd565b60405290508062000f0a8362000e8c565b815262000f1a6020840162000e8c565b602082015262000f2d6040840162000e8c565b604082015262000f406060840162000e8c565b60608201525092915050565b60006001600160401b0382111562000f685762000f6862000dcd565b5060051b60200190565b8051801515811462000ea457600080fd5b805161ffff8116811462000ea457600080fd5b805163ffffffff8116811462000ea457600080fd5b80516001600160e01b03198116811462000ea457600080fd5b600082601f83011262000fd657600080fd5b8151602062000fef62000fe98362000f4c565b62000e59565b82815261024092830285018201928282019190878511156200101057600080fd5b8387015b85811015620011d257808903828112156200102f5760008081fd5b6200103962000de3565b620010448362000ea9565b815261022080601f19840112156200105c5760008081fd5b6200106662000e0e565b92506200107588850162000f72565b835260406200108681860162000f83565b8985015260606200109981870162000f96565b8286015260809150620010ae82870162000f96565b9085015260a0620010c186820162000f96565b8286015260c09150620010d682870162000f83565b9085015260e0620010e986820162000f96565b828601526101009150620010ff82870162000f83565b908501526101206200111386820162000f83565b8286015261014091506200112982870162000f83565b908501526101606200113d86820162000f96565b8286015261018091506200115382870162000f96565b908501526101a06200116786820162000ea9565b828601526101c091506200117d82870162000ea9565b908501526101e06200119186820162000f96565b828601526102009150620011a782870162000f72565b90850152620011b885830162000fab565b908401525080870191909152845292840192810162001014565b5090979650505050505050565b600082601f830112620011f157600080fd5b815160206200120462000fe98362000f4c565b82815260069290921b840181019181810190868411156200122457600080fd5b8286015b848110156200127a5760408189031215620012435760008081fd5b6200124d62000de3565b620012588262000e8c565b81526200126785830162000ea9565b8186015283529183019160400162001228565b509695505050505050565b600082601f8301126200129757600080fd5b81516020620012aa62000fe98362000f4c565b82815260059290921b84018101918181019086841115620012ca57600080fd5b8286015b848110156200127a5780516001600160401b0380821115620012ef57600080fd5b908801906040601f19838c0381018213156200130a57600080fd5b6200131462000de3565b6200132189860162000ea9565b815282850151848111156200133557600080fd5b8086019550508c603f8601126200134b57600080fd5b8885015193506200136062000fe98562000f4c565b84815260e09094028501830193898101908e8611156200137f57600080fd5b958401955b858710156200145857868f0360e08112156200139f57600080fd5b620013a962000de3565b620013b48962000e8c565b815260c08683011215620013c757600080fd5b620013d162000e34565b9150620013e08d8a0162000f96565b8252620013ef878a0162000f96565b8d8301526200140160608a0162000f83565b878301526200141360808a0162000f96565b60608301526200142660a08a0162000f96565b60808301526200143960c08a0162000f72565b60a0830152808d0191909152825260e09690960195908a019062001384565b828b015250875250505092840192508301620012ce565b60008060008060008587036101a08112156200148a57600080fd5b60c08112156200149957600080fd5b50620014a462000e34565b620014af8762000e8c565b8152620014bf6020880162000ea9565b602082015260408701516001600160601b0381168114620014df57600080fd5b6040820152620014f26060880162000e8c565b6060820152620015056080880162000e8c565b60808201526200151860a0880162000e8c565b60a082015294506200152e8760c0880162000ec1565b6101408701519094506001600160401b03808211156200154d57600080fd5b6200155b89838a0162000fc4565b94506101608801519150808211156200157357600080fd5b6200158189838a01620011df565b93506101808801519150808211156200159957600080fd5b50620015a88882890162001285565b9150509295509295909350565b634e487b7160e01b600052603260045260246000fd5b815460ff81161515825261026082019061ffff600882901c8116602085015263ffffffff601883901c811660408601526200161360608601828560381c1663ffffffff169052565b6200162b60808601828560581c1663ffffffff169052565b6200164160a08601838560781c1661ffff169052565b6200165960c08601828560881c1663ffffffff169052565b6200166f60e08601838560a81c1661ffff169052565b620016866101008601838560b81c1661ffff169052565b6200169d6101208601838560c81c1661ffff169052565b620016b66101408601828560d81c1663ffffffff169052565b600186015463ffffffff8282161661016087015292506001600160401b03602084901c81166101808701529150620016ff6101a08601838560601c166001600160401b03169052565b620017186101c08601828560a01c1663ffffffff169052565b5050620017306101e0840160ff8360c01c1615159052565b60181b6001600160e01b03191661020083015260028301546001600160401b03166102208301526003909201546102409091015290565b8151151581526102208101602083015162001788602084018261ffff169052565b506040830151620017a1604084018263ffffffff169052565b506060830151620017ba606084018263ffffffff169052565b506080830151620017d3608084018263ffffffff169052565b5060a0830151620017ea60a084018261ffff169052565b5060c08301516200180360c084018263ffffffff169052565b5060e08301516200181a60e084018261ffff169052565b506101008381015161ffff9081169184019190915261012080850151909116908301526101408084015163ffffffff9081169184019190915261016080850151821690840152610180808501516001600160401b03908116918501919091526101a080860151909116908401526101c080850151909116908301526101e080840151151590830152610200928301516001600160e01b031916929091019190915290565b60805160a05160c05160e051610100516101205161584862001977600039600081816102da0152818161116101526125d50152600081816102ab015281816125ad015261341601526000818161027c015281816125830152612c8d0152600081816102180152818161251e01528181612a7a01526134a70152600081816101e9015281816124f901528181612f3f0152612fd10152600081816102480152818161255001528181613093015261310301526158486000f3fe608060405234801561001057600080fd5b50600436106101515760003560e01c806379ba5097116100cd578063a6f3ab6c11610081578063df0aa9e911610066578063df0aa9e9146108c4578063f2fde38b146108d7578063fbca3b74146108ea57600080fd5b8063a6f3ab6c1461089e578063ca643213146108b157600080fd5b80638da5cb5b116100b25780638da5cb5b146108675780639041be3d14610878578063a69c64c01461088b57600080fd5b806379ba5097146106fc57806382b49eb01461070457600080fd5b80633a019940116101245780636def4ce7116101095780636def4ce7146103b65780637437ff9f14610676578063770e2dc4146106e957600080fd5b80633a0199401461038157806348a98aa41461038b57600080fd5b8063061877e31461015657806306285c69146101a7578063181f5a771461031757806320487ded14610360575b600080fd5b61018961016436600461408c565b6001600160a01b031660009081526007602052604090205467ffffffffffffffff1690565b60405167ffffffffffffffff90911681526020015b60405180910390f35b61030a6040805160c081018252600080825260208201819052918101829052606081018290526080810182905260a08101919091526040518060c001604052807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031681526020017f000000000000000000000000000000000000000000000000000000000000000067ffffffffffffffff1681526020017f00000000000000000000000000000000000000000000000000000000000000006bffffffffffffffffffffffff1681526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031681526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031681526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316815250905090565b60405161019e91906140a9565b6103536040518060400160405280601c81526020017f45564d3245564d4d756c74694f6e52616d7020312e362e302d6465760000000081525081565b60405161019e9190614165565b61037361036e3660046141b1565b61090a565b60405190815260200161019e565b610389610f62565b005b61039e610399366004614201565b611126565b6040516001600160a01b03909116815260200161019e565b6106696103c436600461423a565b60408051610280810182526000606082018181526080830182905260a0830182905260c0830182905260e08301829052610100830182905261012083018290526101408301829052610160830182905261018083018290526101a083018290526101c083018290526101e083018290526102008301829052610220830182905261024083018290526102608301829052825260208201819052918101919091525067ffffffffffffffff908116600090815260066020908152604091829020825161028081018452815460ff80821615156060840190815261ffff6101008085048216608087015263ffffffff63010000008604811660a08801526701000000000000008604811660c08801526b0100000000000000000000008604811660e0808901919091526f010000000000000000000000000000008704841692880192909252710100000000000000000000000000000000008604811661012088015275010000000000000000000000000000000000000000008604831661014088015277010000000000000000000000000000000000000000000000860483166101608801527901000000000000000000000000000000000000000000000000008087049093166101808801527b0100000000000000000000000000000000000000000000000000000090950485166101a087015260018701548086166101c088015264010000000081048b166101e08801526c0100000000000000000000000081048b166102008801527401000000000000000000000000000000000000000081049095166102208701527801000000000000000000000000000000000000000000000000850490931615156102408601526001600160e01b0319930490911b919091166102608301528152600282015490941691840191909152600301549082015290565b60405161019e919061439d565b6106dc60408051608081018252600080825260208201819052918101829052606081019190915250604080516080810182526002546001600160a01b03908116825260035481166020830152600454811692820192909252600554909116606082015290565b60405161019e91906143d6565b6103896106f73660046145e6565b6111d5565b6103896111eb565b610807610712366004614201565b6040805160c081018252600080825260208201819052918101829052606081018290526080810182905260a08101919091525067ffffffffffffffff9190911660009081526008602090815260408083206001600160a01b0394909416835292815290829020825160c081018452905463ffffffff8082168352640100000000820481169383019390935268010000000000000000810461ffff16938201939093526a01000000000000000000008304821660608201526e01000000000000000000000000000083049091166080820152720100000000000000000000000000000000000090910460ff16151560a082015290565b60405161019e9190600060c08201905063ffffffff80845116835280602085015116602084015261ffff60408501511660408401528060608501511660608401528060808501511660808401525060a0830151151560a083015292915050565b6000546001600160a01b031661039e565b61018961088636600461423a565b6112b4565b610389610899366004614860565b6112e0565b6103896108ac36600461491e565b6112f4565b6103896108bf3660046149bb565b611305565b6103736108d2366004614bcb565b611316565b6103896108e536600461408c565b61178e565b6108fd6108f836600461423a565b61179f565b60405161019e9190614c37565b67ffffffffffffffff82166000908152600660205260408120805460ff1661096f576040517f99ac52f200000000000000000000000000000000000000000000000000000000815267ffffffffffffffff851660048201526024015b60405180910390fd5b6109a0846109806020860186614c84565b905061098f6040870187614cd2565b905061099b8780614c84565b6117d3565b60006007816109b5608087016060880161408c565b6001600160a01b03168152602081019190915260400160009081205467ffffffffffffffff169150819003610a32576109f4608085016060860161408c565b6040517fa7499d200000000000000000000000000000000000000000000000000000000081526001600160a01b039091166004820152602401610966565b60035460009081906001600160a01b031663ffdb4b37610a586080890160608a0161408c565b6040516001600160e01b031960e084901b1681526001600160a01b03909116600482015267ffffffffffffffff8a1660248201526044016040805180830381865afa158015610aab573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610acf9190614d33565b90925090506000808080610ae660408b018b614cd2565b90501115610b2157610b158a610b0260808c0160608d0161408c565b87610b1060408e018e614cd2565b6118fb565b91945092509050610b58565b6001870154610b559074010000000000000000000000000000000000000000900463ffffffff16662386f26fc10000614d8c565b92505b865460009077010000000000000000000000000000000000000000000000900461ffff1615610bc157610bbe8b6dffffffffffffffffffffffffffff607088901c16610ba760208e018e614c84565b9050610bb660408f018f614cd2565b905086611cd7565b90505b875460009063ffffffff8516906f01000000000000000000000000000000900461ffff16610bf260208e018e614c84565b610bfd929150614d8c565b8a54610c1e91906b010000000000000000000000900463ffffffff16614da3565b610c289190614da3565b9050610ebb610c3a60808d018d614c84565b8b604051806102200160405290816000820160009054906101000a900460ff161515151581526020016000820160019054906101000a900461ffff1661ffff1661ffff1681526020016000820160039054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016000820160079054906101000a900463ffffffff1663ffffffff1663ffffffff16815260200160008201600b9054906101000a900463ffffffff1663ffffffff1663ffffffff16815260200160008201600f9054906101000a900461ffff1661ffff1661ffff1681526020016000820160119054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016000820160159054906101000a900461ffff1661ffff1661ffff1681526020016000820160179054906101000a900461ffff1661ffff1661ffff1681526020016000820160199054906101000a900461ffff1661ffff1661ffff16815260200160008201601b9054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016001820160009054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016001820160049054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff16815260200160018201600c9054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff1681526020016001820160149054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016001820160189054906101000a900460ff161515151581526020016001820160199054906101000a900460e01b6001600160e01b0319166001600160e01b03191681525050611ddd565b51610ec69082614da3565b60018a01549091506000906c01000000000000000000000000900467ffffffffffffffff16610f05836dffffffffffffffffffffffffffff8a16614d8c565b610f0f9190614d8c565b90506001600160e01b0388168382610f3167ffffffffffffffff8d168a614d8c565b610f3b9190614da3565b610f459190614da3565b610f4f9190614db6565b9a50505050505050505050505b92915050565b600354604080517fcdc73d5100000000000000000000000000000000000000000000000000000000815290516000926001600160a01b03169163cdc73d5191600480830192869291908290030181865afa158015610fc4573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610fec9190810190614df1565b6005549091506001600160a01b031660005b825181101561112157600083828151811061101b5761101b614e80565b60209081029190910101516040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529091506000906001600160a01b038316906370a0823190602401602060405180830381865afa158015611089573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110ad9190614eaf565b90508015611117576110c96001600160a01b0383168583611e98565b816001600160a01b0316846001600160a01b03167f508d7d183612c18fc339b42618912b9fa3239f631dd7ec0671f950200a0fa66e8360405161110e91815260200190565b60405180910390a35b5050600101610ffe565b505050565b6040517fbbe4f6db0000000000000000000000000000000000000000000000000000000081526001600160a01b0382811660048301526000917f00000000000000000000000000000000000000000000000000000000000000009091169063bbe4f6db90602401602060405180830381865afa1580156111aa573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111ce9190614ec8565b9392505050565b6111dd611f03565b6111e78282611f5f565b5050565b6001546001600160a01b031633146112455760405162461bcd60e51b815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e6572000000000000000000006044820152606401610966565b60008054337fffffffffffffffffffffffff0000000000000000000000000000000000000000808316821784556001805490911690556040516001600160a01b0390921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b67ffffffffffffffff8082166000908152600660205260408120600201549091610f5c91166001614ee5565b6112e8611f03565b6112f18161233f565b50565b6112fc611f03565b6112f18161241c565b61130d611f03565b6112f181612635565b67ffffffffffffffff841660009081526006602052604081208161133d8288888888612bda565b905060005b8160e001515181101561172a57600061135e6040890189614cd2565b8381811061136e5761136e614e80565b9050604002018036038101906113849190614f0d565b905080602001516000036113c4576040517f5cf0444900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006113d48a8360000151611126565b90506001600160a01b038116158061148a57506040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527faff2afbf0000000000000000000000000000000000000000000000000000000060048201526001600160a01b038216906301ffc9a790602401602060405180830381865afa158015611464573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114889190614f47565b155b156114cf5781516040517fbf16aab60000000000000000000000000000000000000000000000000000000081526001600160a01b039091166004820152602401610966565b6000816001600160a01b0316639a4575b96040518060a001604052808d80600001906114fb9190614c84565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050509082525067ffffffffffffffff8f166020808301919091526001600160a01b03808e16604080850191909152918901516060840152885116608090920191909152516001600160e01b031960e084901b16815261158e9190600401614f64565b6000604051808303816000875af11580156115ad573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526115d59190810190615031565b90506020816020015151118015611636575067ffffffffffffffff8b16600090815260086020908152604080832086516001600160a01b0316845282529091205490820151516e01000000000000000000000000000090910463ffffffff16105b1561167b5782516040517f36f536ca0000000000000000000000000000000000000000000000000000000081526001600160a01b039091166004820152602401610966565b600186015481516116ac91790100000000000000000000000000000000000000000000000000900460e01b9061391d565b60408051608081019091526001600160a01b03831660a08201528060c081016040516020818303038152906040528152602001826000015181526020018260200151815260200184602001518152508560e00151858151811061171157611711614e80565b6020026020010181905250505050806001019050611342565b50611739818360030154613957565b81515260405167ffffffffffffffff8816907f0f07cd31e53232da9125e517f09550fdde74bf43d6a0a76ebd41674dafe2ab2990611778908490615166565b60405180910390a251519150505b949350505050565b611796611f03565b6112f181613a39565b60606040517f9e7177c800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff8516600090815260066020526040902080546301000000900463ffffffff1685111561184c5780546040517f86933789000000000000000000000000000000000000000000000000000000008152630100000090910463ffffffff16600482015260248101869052604401610966565b8054610100900461ffff16841115611890576040517f4c056b6a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001810154604080516020601f86018190048102820181019092528481526118f392790100000000000000000000000000000000000000000000000000900460e01b91869086908190840183828082843760009201919091525061391d92505050565b505050505050565b6000808083815b81811015611cca57600087878381811061191e5761191e614e80565b9050604002018036038101906119349190614f0d565b905060006001600160a01b031661194f8c8360000151611126565b6001600160a01b03160361199d5780516040517fbf16aab60000000000000000000000000000000000000000000000000000000081526001600160a01b039091166004820152602401610966565b67ffffffffffffffff8b16600090815260086020908152604080832084516001600160a01b03168452825291829020825160c081018452905463ffffffff8082168352640100000000820481169383019390935268010000000000000000810461ffff16938201939093526a01000000000000000000008304821660608201526e01000000000000000000000000000083049091166080820152720100000000000000000000000000000000000090910460ff16151560a08201819052611b0b5767ffffffffffffffff8c1660009081526006602052604090208054611aab90790100000000000000000000000000000000000000000000000000900461ffff16662386f26fc10000614d8c565b611ab59089614da3565b8154909850611ae9907b01000000000000000000000000000000000000000000000000000000900463ffffffff168861527c565b6001820154909750611b019063ffffffff168761527c565b9550505050611cc2565b604081015160009061ffff1615611c125760008c6001600160a01b031684600001516001600160a01b031614611bca5760035484516040517f4ab35b0b0000000000000000000000000000000000000000000000000000000081526001600160a01b039182166004820152911690634ab35b0b90602401602060405180830381865afa158015611b9f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bc39190615299565b9050611bcd565b508a5b620186a0836040015161ffff16611bfa8660200151846001600160e01b0316613afa90919063ffffffff16565b611c049190614d8c565b611c0e9190614db6565b9150505b6060820151611c21908861527c565b9650816080015186611c33919061527c565b8251909650600090611c529063ffffffff16662386f26fc10000614d8c565b905080821015611c7157611c66818a614da3565b985050505050611cc2565b6000836020015163ffffffff16662386f26fc10000611c909190614d8c565b905080831115611cb057611ca4818b614da3565b99505050505050611cc2565b611cba838b614da3565b995050505050505b600101611902565b5050955095509592505050565b60008063ffffffff8316611cec60e086614d8c565b611cf8876101c0614da3565b611d029190614da3565b611d0c9190614da3565b67ffffffffffffffff8816600090815260066020526040812080549293509171010000000000000000000000000000000000810463ffffffff1690611d6e907501000000000000000000000000000000000000000000900461ffff1685614d8c565b611d789190614da3565b825490915077010000000000000000000000000000000000000000000000900461ffff16611db66dffffffffffffffffffffffffffff8a1683614d8c565b611dc09190614d8c565b611dd090655af3107a4000614d8c565b9998505050505050505050565b60408051808201909152600080825260208201526000611e038585856101800151613b22565b9050826060015163ffffffff1681600001511115611e4d576040517f4c4fc93a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b826101e001518015611e6157508060200151155b15611786576040517fee433e9900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b03167fa9059cbb00000000000000000000000000000000000000000000000000000000179052611121908490613c9b565b6000546001600160a01b03163314611f5d5760405162461bcd60e51b815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401610966565b565b60005b8251811015612268576000838281518110611f7f57611f7f614e80565b6020026020010151905060008160000151905060005b82602001515181101561225a57600083602001518281518110611fba57611fba614e80565b6020026020010151602001519050600084602001518381518110611fe057611fe0614e80565b60200260200101516000015190506020826080015163ffffffff1610156120505760808201516040517f24ecdc020000000000000000000000000000000000000000000000000000000081526001600160a01b038316600482015263ffffffff9091166024820152604401610966565b67ffffffffffffffff841660008181526008602090815260408083206001600160a01b0386168085529083529281902086518154938801518389015160608a015160808b015160a08c015115157201000000000000000000000000000000000000027fffffffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffff63ffffffff9283166e01000000000000000000000000000002167fffffffffffffffffffffffffff0000000000ffffffffffffffffffffffffffff9383166a0100000000000000000000027fffffffffffffffffffffffffffffffffffff00000000ffffffffffffffffffff61ffff9096166801000000000000000002959095167fffffffffffffffffffffffffffffffffffff000000000000ffffffffffffffff968416640100000000027fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000909b16939097169290921798909817939093169390931717919091161792909217909155519091907f94967ae9ea7729ad4f54021c1981765d2b1d954f7c92fbec340aa0a54f46b8b590612248908690600060c08201905063ffffffff80845116835280602085015116602084015261ffff60408501511660408401528060608501511660608401528060808501511660808401525060a0830151151560a083015292915050565b60405180910390a35050600101611f95565b505050806001019050611f62565b5060005b815181101561112157600082828151811061228957612289614e80565b602002602001015160000151905060008383815181106122ab576122ab614e80565b60209081029190910181015181015167ffffffffffffffff841660008181526008845260408082206001600160a01b038516808452955280822080547fffffffffffffffffffffffffff000000000000000000000000000000000000001690555192945090917f4de5b1bcbca6018c11303a2c3f4a4b4f22a1c741d8c4ba430d246ac06c5ddf8b9190a3505060010161226c565b60005b81518110156111e757600082828151811061235f5761235f614e80565b6020026020010151600001519050600083838151811061238157612381614e80565b6020908102919091018101518101516001600160a01b03841660008181526007845260409081902080547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff85169081179091559051908152919350917fbb77da6f7210cdd16904228a9360133d1d7dfff99b1bc75f128da5b53e28f97d910160405180910390a25050600101612342565b60208101516001600160a01b03161580612441575060608101516001600160a01b0316155b15612478576040517f35be3ac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8051600280547fffffffffffffffffffffffff00000000000000000000000000000000000000009081166001600160a01b03938416179091556020808401516003805484169185169190911790556040808501516004805485169186169190911790556060808601516005805490951690861617909355805160c0810182527f0000000000000000000000000000000000000000000000000000000000000000851681527f000000000000000000000000000000000000000000000000000000000000000067ffffffffffffffff16928101929092527f00000000000000000000000000000000000000000000000000000000000000006bffffffffffffffffffffffff16828201527f00000000000000000000000000000000000000000000000000000000000000008416928201929092527f0000000000000000000000000000000000000000000000000000000000000000831660808201527f000000000000000000000000000000000000000000000000000000000000000090921660a0830152517f4012fe74115805c44a121d8f9edc3d234df8f05f53b52864b8e5e8a30384b8aa9161262a9184906152b4565b60405180910390a150565b60005b81518110156111e757600082828151811061265557612655614e80565b60200260200101519050600083838151811061267357612673614e80565b60200260200101516000015190508067ffffffffffffffff16600014806126ab57506020820151610180015167ffffffffffffffff16155b806126e95750602082015161020001516001600160e01b0319167f2812d52c0000000000000000000000000000000000000000000000000000000014155b1561272c576040517fc35aa79d00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff82166004820152602401610966565b6000600660008367ffffffffffffffff1667ffffffffffffffff168152602001908152602001600020905060006040518060600160405280856020015181526020018360020160009054906101000a900467ffffffffffffffff1667ffffffffffffffff1681526020018360030154815250905080600001518260000160008201518160000160006101000a81548160ff02191690831515021790555060208201518160000160016101000a81548161ffff021916908361ffff16021790555060408201518160000160036101000a81548163ffffffff021916908363ffffffff16021790555060608201518160000160076101000a81548163ffffffff021916908363ffffffff160217905550608082015181600001600b6101000a81548163ffffffff021916908363ffffffff16021790555060a082015181600001600f6101000a81548161ffff021916908361ffff16021790555060c08201518160000160116101000a81548163ffffffff021916908363ffffffff16021790555060e08201518160000160156101000a81548161ffff021916908361ffff1602179055506101008201518160000160176101000a81548161ffff021916908361ffff1602179055506101208201518160000160196101000a81548161ffff021916908361ffff16021790555061014082015181600001601b6101000a81548163ffffffff021916908363ffffffff1602179055506101608201518160010160006101000a81548163ffffffff021916908363ffffffff1602179055506101808201518160010160046101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055506101a082015181600101600c6101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055506101c08201518160010160146101000a81548163ffffffff021916908363ffffffff1602179055506101e08201518160010160186101000a81548160ff0219169083151502179055506102008201518160010160196101000a81548163ffffffff021916908360e01c021790555090505081600301546000801b03612b2057604080517f130ac867e79e2789f923760a88743d292acdf7002139a588206e2260f73f7321602082015267ffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000811692820192909252908416606082015230608082015260a00160408051601f19818403018152918152815160209092019190912082820181905260038401555167ffffffffffffffff8416907f26f8c55bd3f591fd6042c98ad4d707257cd565dc47609bfa3ba517400d05704490612b1390859061535d565b60405180910390a2612bcb565b60208460200151610160015163ffffffff161015612b8457602084015161016001516040517f24ecdc020000000000000000000000000000000000000000000000000000000081526000600482015263ffffffff9091166024820152604401610966565b8267ffffffffffffffff167fd42d3a670a4f1ab5d8703efa22bb17041446365cfcfa33980ced685a080cf7cb8560200151604051612bc291906154f1565b60405180910390a25b50505050806001019050612638565b604080516101a08101825260006101008201818152610120830182905261014083018290526101608301829052610180830182905282526020820181905260609282018390528282018390526080820183905260a0820181905260c082015260e08101919091526040517f2cbc26bb000000000000000000000000000000000000000000000000000000008152608086901b77ffffffffffffffff000000000000000000000000000000001660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690632cbc26bb90602401602060405180830381865afa158015612cdc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d009190614f47565b15612d43576040517ffdbd6a7200000000000000000000000000000000000000000000000000000000815267ffffffffffffffff86166004820152602401610966565b6001600160a01b038216612d83576040517fa4ec747900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002546001600160a01b03163314612dc7576040517f1c0a352900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b855460ff16612e0e576040517f99ac52f200000000000000000000000000000000000000000000000000000000815267ffffffffffffffff86166004820152602401610966565b6000612e1d6040860186614cd2565b9150612e3f905086612e326020880188614c84565b90508361099b8980614c84565b8015612f33576004546001600160a01b03168015612f31576040517fe0a0e5060000000000000000000000000000000000000000000000000000000081526001600160a01b0382169063e0a0e50690612e9e908a908a906004016155c4565b600060405180830381600087803b158015612eb857600080fd5b505af1925050508015612ec9575060015b612f31573d808015612ef7576040519150601f19603f3d011682016040523d82523d6000602084013e612efc565b606091505b50806040517f09c253250000000000000000000000000000000000000000000000000000000081526004016109669190614165565b505b60006001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016612f6f608088016060890161408c565b6001600160a01b031603612f8457508361303f565b6003546001600160a01b03166241e5be612fa46080890160608a0161408c565b60405160e083901b6001600160e01b03191681526001600160a01b039182166004820152602481018990527f00000000000000000000000000000000000000000000000000000000000000009091166044820152606401602060405180830381865afa158015613018573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061303c9190614eaf565b90505b61304f608087016060880161408c565b6001600160a01b03167f075a2720282fdf622141dae0b048ef90a21a7e57c134c76912d19d006b3b3f6f8260405161308991815260200190565b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000006bffffffffffffffffffffffff16811115613130576040517f6a92a483000000000000000000000000000000000000000000000000000000008152600481018290526bffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000166024820152604401610966565b60006133c66131426080890189614c84565b8b600001604051806102200160405290816000820160009054906101000a900460ff161515151581526020016000820160019054906101000a900461ffff1661ffff1661ffff1681526020016000820160039054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016000820160079054906101000a900463ffffffff1663ffffffff1663ffffffff16815260200160008201600b9054906101000a900463ffffffff1663ffffffff1663ffffffff16815260200160008201600f9054906101000a900461ffff1661ffff1661ffff1681526020016000820160119054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016000820160159054906101000a900461ffff1661ffff1661ffff1681526020016000820160179054906101000a900461ffff1661ffff1661ffff1681526020016000820160199054906101000a900461ffff1661ffff1661ffff16815260200160008201601b9054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016001820160009054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016001820160049054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff16815260200160018201600c9054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff1681526020016001820160149054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016001820160189054906101000a900460ff161515151581526020016001820160199054906101000a900460e01b6001600160e01b0319166001600160e01b03191681525050611ddd565b60200151613486576040517fea458c0c00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff891660048201526001600160a01b0386811660248301527f0000000000000000000000000000000000000000000000000000000000000000169063ea458c0c906044016020604051808303816000875af115801561345f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061348391906156e2565b90505b604080516101a081019091526000610100820181815267ffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000081166101208501528b811661014085015260028d0180549394938493926101608501929187916134f691166156ff565b91906101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905567ffffffffffffffff1681526020018567ffffffffffffffff168152508152602001876001600160a01b0316815260200189806020019061355c9190614c84565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050908252506020016135a08a80614c84565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050509082525060200161386e6135ea60808c018c614c84565b8e600001604051806102200160405290816000820160009054906101000a900460ff161515151581526020016000820160019054906101000a900461ffff1661ffff1661ffff1681526020016000820160039054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016000820160079054906101000a900463ffffffff1663ffffffff1663ffffffff16815260200160008201600b9054906101000a900463ffffffff1663ffffffff1663ffffffff16815260200160008201600f9054906101000a900461ffff1661ffff1661ffff1681526020016000820160119054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016000820160159054906101000a900461ffff1661ffff1661ffff1681526020016000820160179054906101000a900461ffff1661ffff1661ffff1681526020016000820160199054906101000a900461ffff1661ffff1661ffff16815260200160008201601b9054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016001820160009054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016001820160049054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff16815260200160018201600c9054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff1681526020016001820160149054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016001820160189054906101000a900460ff161515151581526020016001820160199054906101000a900460e01b6001600160e01b0319166001600160e01b03191681525050613d80565b815260200161388360808b0160608c0161408c565b6001600160a01b031681526020018881526020018567ffffffffffffffff8111156138b0576138b0614412565b60405190808252806020026020018201604052801561390c57816020015b6138f96040518060800160405280606081526020016060815260200160608152602001600081525090565b8152602001906001900390816138ce5790505b5090529a9950505050505050505050565b7fd7ed2ad4000000000000000000000000000000000000000000000000000000006001600160e01b03198316016111e75761112181613e00565b60008060001b82846020015185606001518660000151606001518760000151608001518860a001518960c0015160405160200161399996959493929190615726565b604051602081830303815290604052805190602001208560400151805190602001208660e001516040516020016139d0919061577a565b60408051601f1981840301815282825280516020918201206080808c0151805190840120928501989098529183019590955260608201939093529384015260a083015260c082015260e00160405160208183030381529060405280519060200120905092915050565b336001600160a01b03821603613a915760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401610966565b600180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6000670de0b6b3a7640000613b18836001600160e01b038616614d8c565b6111ce9190614db6565b60408051808201909152600080825260208201526000839003613b6357506040805180820190915267ffffffffffffffff82168152600060208201526111ce565b6000613b6f848661578d565b90506000613b8085600481896157bd565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509293505050506001600160e01b031982167fe7e230f00000000000000000000000000000000000000000000000000000000001613c055780806020019051810190613bfc91906157e7565b925050506111ce565b7f6859a837000000000000000000000000000000000000000000000000000000006001600160e01b0319831601613c6957604051806040016040528082806020019051810190613c559190614eaf565b8152600060209091015292506111ce915050565b6040517f5247fdce00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000613cf0826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316613e5b9092919063ffffffff16565b8051909150156111215780806020019051810190613d0e9190614f47565b6111215760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610966565b6102008101516060907fd7ed2ad4000000000000000000000000000000000000000000000000000000006001600160e01b0319821601613df857613dc5858585611ddd565b604080518251602080830191909152909201511515908201526060016040516020818303038152906040529150506111ce565b509392505050565b60008151602014613e3f57816040517f8d666f600000000000000000000000000000000000000000000000000000000081526004016109669190614165565b610f5c82806020019051810190613e569190614eaf565b613e6a565b60606117868484600085613ed7565b60006001600160a01b03821180613e82575061040082105b15613ed35760408051602081018490520160408051601f19818403018152908290527f8d666f6000000000000000000000000000000000000000000000000000000000825261096691600401614165565b5090565b606082471015613f4f5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610966565b600080866001600160a01b03168587604051613f6b919061581f565b60006040518083038185875af1925050503d8060008114613fa8576040519150601f19603f3d011682016040523d82523d6000602084013e613fad565b606091505b5091509150613fbe87838387613fc9565b979650505050505050565b60608315614038578251600003614031576001600160a01b0385163b6140315760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610966565b5081611786565b611786838381511561404d5781518083602001fd5b8060405162461bcd60e51b81526004016109669190614165565b6001600160a01b03811681146112f157600080fd5b803561408781614067565b919050565b60006020828403121561409e57600080fd5b81356111ce81614067565b60c08101610f5c82846001600160a01b0380825116835267ffffffffffffffff60208301511660208401526bffffffffffffffffffffffff60408301511660408401528060608301511660608401528060808301511660808401528060a08301511660a0840152505050565b60005b83811015614130578181015183820152602001614118565b50506000910152565b60008151808452614151816020860160208601614115565b601f01601f19169290920160200192915050565b6020815260006111ce6020830184614139565b67ffffffffffffffff811681146112f157600080fd5b803561408781614178565b600060a082840312156141ab57600080fd5b50919050565b600080604083850312156141c457600080fd5b82356141cf81614178565b9150602083013567ffffffffffffffff8111156141eb57600080fd5b6141f785828601614199565b9150509250929050565b6000806040838503121561421457600080fd5b823561421f81614178565b9150602083013561422f81614067565b809150509250929050565b60006020828403121561424c57600080fd5b81356111ce81614178565b8051151582526020810151614272602084018261ffff169052565b50604081015161428a604084018263ffffffff169052565b5060608101516142a2606084018263ffffffff169052565b5060808101516142ba608084018263ffffffff169052565b5060a08101516142d060a084018261ffff169052565b5060c08101516142e860c084018263ffffffff169052565b5060e08101516142fe60e084018261ffff169052565b506101008181015161ffff9081169184019190915261012080830151909116908301526101408082015163ffffffff90811691840191909152610160808301518216908401526101808083015167ffffffffffffffff908116918501919091526101a080840151909116908401526101c080830151909116908301526101e080820151151590830152610200908101516001600160e01b031916910152565b6000610260820190506143b1828451614257565b602083015167ffffffffffffffff166102208301526040909201516102409091015290565b60808101610f5c828480516001600160a01b03908116835260208083015182169084015260408083015182169084015260609182015116910152565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040805190810167ffffffffffffffff8111828210171561446457614464614412565b60405290565b60405160c0810167ffffffffffffffff8111828210171561446457614464614412565b604051610220810167ffffffffffffffff8111828210171561446457614464614412565b604051601f8201601f1916810167ffffffffffffffff811182821017156144da576144da614412565b604052919050565b600067ffffffffffffffff8211156144fc576144fc614412565b5060051b60200190565b803563ffffffff8116811461408757600080fd5b803561ffff8116811461408757600080fd5b80151581146112f157600080fd5b80356140878161452c565b600082601f83011261455657600080fd5b8135602061456b614566836144e2565b6144b1565b82815260069290921b8401810191818101908684111561458a57600080fd5b8286015b848110156145db57604081890312156145a75760008081fd5b6145af614441565b81356145ba81614178565b8152818501356145c981614067565b8186015283529183019160400161458e565b509695505050505050565b600080604083850312156145f957600080fd5b67ffffffffffffffff8335111561460f57600080fd5b83601f84358501011261462157600080fd5b61463161456684358501356144e2565b8335840180358083526020808401939260059290921b9091010186101561465757600080fd5b602085358601015b85358601803560051b0160200181101561482a5767ffffffffffffffff8135111561468957600080fd5b6040601f198235883589010189030112156146a357600080fd5b6146ab614441565b6146be6020833589358a01010135614178565b863587018235016020810135825267ffffffffffffffff60409091013511156146e657600080fd5b86358701823501604081013501603f8101891361470257600080fd5b61471261456660208301356144e2565b602082810135808352908201919060e00283016040018b101561473457600080fd5b604083015b604060e06020860135028501018110156148115760e0818d03121561475d57600080fd5b614765614441565b61476f8235614067565b8135815260c0601f19838f0301121561478757600080fd5b61478f61446a565b61479b60208401614506565b81526147a960408401614506565b60208201526147ba6060840161451a565b60408201526147cb60808401614506565b60608201526147dc60a08401614506565b60808201526147ee60c084013561452c565b60c083013560a0820152602082810191909152908452929092019160e001614739565b506020848101919091529286525050928301920161465f565b5092505067ffffffffffffffff6020840135111561484757600080fd5b6148578460208501358501614545565b90509250929050565b6000602080838503121561487357600080fd5b823567ffffffffffffffff81111561488a57600080fd5b8301601f8101851361489b57600080fd5b80356148a9614566826144e2565b81815260069190911b820183019083810190878311156148c857600080fd5b928401925b82841015613fbe57604084890312156148e65760008081fd5b6148ee614441565b84356148f981614067565b81528486013561490881614178565b81870152825260409390930192908401906148cd565b60006080828403121561493057600080fd5b6040516080810181811067ffffffffffffffff8211171561495357614953614412565b604052823561496181614067565b8152602083013561497181614067565b6020820152604083013561498481614067565b6040820152606083013561499781614067565b60608201529392505050565b80356001600160e01b03198116811461408757600080fd5b600060208083850312156149ce57600080fd5b823567ffffffffffffffff8111156149e557600080fd5b8301601f810185136149f657600080fd5b8035614a04614566826144e2565b8181526102409182028301840191848201919088841115614a2457600080fd5b938501935b83851015614bbf5784890381811215614a425760008081fd5b614a4a614441565b8635614a5581614178565b8152610220601f198301811315614a6c5760008081fd5b614a7461448d565b9250614a8189890161453a565b83526040614a90818a0161451a565b8a8501526060614aa1818b01614506565b8286015260809150614ab4828b01614506565b9085015260a0614ac58a8201614506565b8286015260c09150614ad8828b0161451a565b9085015260e0614ae98a8201614506565b828601526101009150614afd828b0161451a565b90850152610120614b0f8a820161451a565b828601526101409150614b23828b0161451a565b90850152610160614b358a8201614506565b828601526101809150614b49828b01614506565b908501526101a0614b5b8a820161418e565b828601526101c09150614b6f828b0161418e565b908501526101e0614b818a8201614506565b828601526102009150614b95828b0161453a565b90850152614ba48983016149a3565b90840152508088019190915283529384019391850191614a29565b50979650505050505050565b60008060008060808587031215614be157600080fd5b8435614bec81614178565b9350602085013567ffffffffffffffff811115614c0857600080fd5b614c1487828801614199565b935050604085013591506060850135614c2c81614067565b939692955090935050565b6020808252825182820181905260009190848201906040850190845b81811015614c785783516001600160a01b031683529284019291840191600101614c53565b50909695505050505050565b6000808335601e19843603018112614c9b57600080fd5b83018035915067ffffffffffffffff821115614cb657600080fd5b602001915036819003821315614ccb57600080fd5b9250929050565b6000808335601e19843603018112614ce957600080fd5b83018035915067ffffffffffffffff821115614d0457600080fd5b6020019150600681901b3603821315614ccb57600080fd5b80516001600160e01b038116811461408757600080fd5b60008060408385031215614d4657600080fd5b614d4f83614d1c565b915061485760208401614d1c565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8082028115828204841417610f5c57610f5c614d5d565b80820180821115610f5c57610f5c614d5d565b600082614dec577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b60006020808385031215614e0457600080fd5b825167ffffffffffffffff811115614e1b57600080fd5b8301601f81018513614e2c57600080fd5b8051614e3a614566826144e2565b81815260059190911b82018301908381019087831115614e5957600080fd5b928401925b82841015613fbe578351614e7181614067565b82529284019290840190614e5e565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600060208284031215614ec157600080fd5b5051919050565b600060208284031215614eda57600080fd5b81516111ce81614067565b67ffffffffffffffff818116838216019080821115614f0657614f06614d5d565b5092915050565b600060408284031215614f1f57600080fd5b614f27614441565b8235614f3281614067565b81526020928301359281019290925250919050565b600060208284031215614f5957600080fd5b81516111ce8161452c565b602081526000825160a06020840152614f8060c0840182614139565b905067ffffffffffffffff602085015116604084015260408401516001600160a01b038082166060860152606086015160808601528060808701511660a086015250508091505092915050565b600082601f830112614fde57600080fd5b815167ffffffffffffffff811115614ff857614ff8614412565b61500b6020601f19601f840116016144b1565b81815284602083860101111561502057600080fd5b611786826020830160208701614115565b60006020828403121561504357600080fd5b815167ffffffffffffffff8082111561505b57600080fd5b908301906040828603121561506f57600080fd5b615077614441565b82518281111561508657600080fd5b61509287828601614fcd565b8252506020830151828111156150a757600080fd5b6150b387828601614fcd565b60208301525095945050505050565b600082825180855260208086019550808260051b84010181860160005b8481101561515957601f1986840301895281516080815181865261510582870182614139565b915050858201518582038787015261511d8282614139565b915050604080830151868303828801526151378382614139565b60609485015197909401969096525050988401989250908301906001016150df565b5090979650505050505050565b602081526151b760208201835180518252602081015167ffffffffffffffff808216602085015280604084015116604085015280606084015116606085015280608084015116608085015250505050565b600060208301516151d360c08401826001600160a01b03169052565b5060408301516101808060e08501526151f06101a0850183614139565b91506060850151601f19808685030161010087015261520f8483614139565b935060808701519150808685030161012087015261522d8483614139565b935060a0870151915061524c6101408701836001600160a01b03169052565b60c087015161016087015260e087015191508086850301838701525061527283826150c2565b9695505050505050565b63ffffffff818116838216019080821115614f0657614f06614d5d565b6000602082840312156152ab57600080fd5b6111ce82614d1c565b610140810161532182856001600160a01b0380825116835267ffffffffffffffff60208301511660208401526bffffffffffffffffffffffff60408301511660408401528060608301511660608401528060808301511660808401528060a08301511660a0840152505050565b82516001600160a01b0390811660c08401526020840151811660e0840152604084015181166101008401526060840151166101208301526111ce565b815460ff81161515825261026082019061ffff600882901c8116602085015263ffffffff601883901c811660408601526153a460608601828560381c1663ffffffff169052565b6153bb60808601828560581c1663ffffffff169052565b6153d060a08601838560781c1661ffff169052565b6153e760c08601828560881c1663ffffffff169052565b6153fc60e08601838560a81c1661ffff169052565b6154126101008601838560b81c1661ffff169052565b6154286101208601838560c81c1661ffff169052565b6154406101408601828560d81c1663ffffffff169052565b600186015463ffffffff82821616610160870152925067ffffffffffffffff602084901c8116610180870152915061548a6101a08601838560601c1667ffffffffffffffff169052565b6154a26101c08601828560a01c1663ffffffff169052565b50506154b96101e0840160ff8360c01c1615159052565b60181b6001600160e01b031916610200830152600283015467ffffffffffffffff166102208301526003909201546102409091015290565b6102208101610f5c8284614257565b6000808335601e1984360301811261551757600080fd5b830160208101925035905067ffffffffffffffff81111561553757600080fd5b803603821315614ccb57600080fd5b818352818160208501375060006020828401015260006020601f19601f840116840101905092915050565b8183526000602080850194508260005b858110156155b957813561559481614067565b6001600160a01b03168752818301358388015260409687019690910190600101615581565b509495945050505050565b600067ffffffffffffffff8085168352604060208401526155e58485615500565b60a060408601526155fa60e086018284615546565b91505061560a6020860186615500565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc080878503016060880152615640848385615546565b935060408801359250601e1988360301831261565b57600080fd5b6020928801928301923591508482111561567457600080fd5b8160061b360383131561568657600080fd5b8087850301608088015261569b848385615571565b94506156a96060890161407c565b6001600160a01b03811660a089015293506156c76080890189615500565b94509250808786030160c08801525050613fbe838383615546565b6000602082840312156156f457600080fd5b81516111ce81614178565b600067ffffffffffffffff80831681810361571c5761571c614d5d565b6001019392505050565b60006001600160a01b03808916835260c0602084015261574960c0840189614139565b67ffffffffffffffff97881660408501529590961660608301525091909316608082015260a0019190915292915050565b6020815260006111ce60208301846150c2565b6001600160e01b031981358181169160048510156157b55780818660040360031b1b83161692505b505092915050565b600080858511156157cd57600080fd5b838611156157da57600080fd5b5050820193919092039150565b6000604082840312156157f957600080fd5b615801614441565b8251815260208301516158138161452c565b60208201529392505050565b60008251615831818460208701614115565b919091019291505056fea164736f6c6343000818000a", + ABI: "[{\"inputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"chainSelector\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"rmnProxy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"nonceManager\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAdminRegistry\",\"type\":\"address\"}],\"internalType\":\"structEVM2EVMMultiOnRamp.StaticConfig\",\"name\":\"staticConfig\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"priceRegistry\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"messageValidator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"feeAggregator\",\"type\":\"address\"}],\"internalType\":\"structEVM2EVMMultiOnRamp.DynamicConfig\",\"name\":\"dynamicConfig\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"CannotSendZeroTokens\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"}],\"name\":\"CursedByRMN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ExtraArgOutOfOrderExecutionMustBeTrue\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GetSupportedTokensFunctionalityRemovedCheckAdminRegistry\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidConfig\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidExtraArgsTag\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MessageGasLimitTooHigh\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"errorReason\",\"type\":\"bytes\"}],\"name\":\"MessageValidationError\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MustBeCalledByRouter\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByOwnerOrAdmin\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RouterMustSetOriginalSender\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"UnsupportedToken\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"components\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"sequenceNumber\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"nonce\",\"type\":\"uint64\"}],\"internalType\":\"structInternal.RampMessageHeader\",\"name\":\"header\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"receiver\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"extraArgs\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"feeToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"feeTokenAmount\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes\",\"name\":\"sourcePoolAddress\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"destTokenAddress\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"structInternal.RampTokenAmount[]\",\"name\":\"tokenAmounts\",\"type\":\"tuple[]\"}],\"indexed\":false,\"internalType\":\"structInternal.EVM2AnyRampMessage\",\"name\":\"message\",\"type\":\"tuple\"}],\"name\":\"CCIPSendRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"chainSelector\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"rmnProxy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"nonceManager\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAdminRegistry\",\"type\":\"address\"}],\"indexed\":false,\"internalType\":\"structEVM2EVMMultiOnRamp.StaticConfig\",\"name\":\"staticConfig\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"priceRegistry\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"messageValidator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"feeAggregator\",\"type\":\"address\"}],\"indexed\":false,\"internalType\":\"structEVM2EVMMultiOnRamp.DynamicConfig\",\"name\":\"dynamicConfig\",\"type\":\"tuple\"}],\"name\":\"ConfigSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"feeToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"feeValueJuels\",\"type\":\"uint256\"}],\"name\":\"FeePaid\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"feeAggregator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"feeToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"FeeTokenWithdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"bytes\",\"name\":\"receiver\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"structClient.EVMTokenAmount[]\",\"name\":\"tokenAmounts\",\"type\":\"tuple[]\"},{\"internalType\":\"address\",\"name\":\"feeToken\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"extraArgs\",\"type\":\"bytes\"}],\"internalType\":\"structClient.EVM2AnyMessage\",\"name\":\"message\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"feeTokenAmount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"originalSender\",\"type\":\"address\"}],\"name\":\"forwardFromRouter\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getDynamicConfig\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"priceRegistry\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"messageValidator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"feeAggregator\",\"type\":\"address\"}],\"internalType\":\"structEVM2EVMMultiOnRamp.DynamicConfig\",\"name\":\"dynamicConfig\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"}],\"name\":\"getExpectedNextSequenceNumber\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"bytes\",\"name\":\"receiver\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"structClient.EVMTokenAmount[]\",\"name\":\"tokenAmounts\",\"type\":\"tuple[]\"},{\"internalType\":\"address\",\"name\":\"feeToken\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"extraArgs\",\"type\":\"bytes\"}],\"internalType\":\"structClient.EVM2AnyMessage\",\"name\":\"message\",\"type\":\"tuple\"}],\"name\":\"getFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"feeTokenAmount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"},{\"internalType\":\"contractIERC20\",\"name\":\"sourceToken\",\"type\":\"address\"}],\"name\":\"getPoolBySourceToken\",\"outputs\":[{\"internalType\":\"contractIPoolV1\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getStaticConfig\",\"outputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"chainSelector\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"rmnProxy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"nonceManager\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAdminRegistry\",\"type\":\"address\"}],\"internalType\":\"structEVM2EVMMultiOnRamp.StaticConfig\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"name\":\"getSupportedTokens\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"priceRegistry\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"messageValidator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"feeAggregator\",\"type\":\"address\"}],\"internalType\":\"structEVM2EVMMultiOnRamp.DynamicConfig\",\"name\":\"dynamicConfig\",\"type\":\"tuple\"}],\"name\":\"setDynamicConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"typeAndVersion\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdrawFeeTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x6101006040523480156200001257600080fd5b5060405162002c3338038062002c338339810160408190526200003591620003db565b33806000816200008c5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000bf57620000bf816200017a565b505082516001600160401b031615905080620000e6575060208201516001600160a01b0316155b80620000fd575060408201516001600160a01b0316155b8062000114575060608201516001600160a01b0316155b1562000133576040516306b7c75960e31b815260040160405180910390fd5b81516001600160401b031660805260208201516001600160a01b0390811660a0526040830151811660c05260608301511660e052620001728162000225565b5050620004d1565b336001600160a01b03821603620001d45760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000083565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b60208101516001600160a01b031615806200024b575060608101516001600160a01b0316155b156200026a576040516306b7c75960e31b815260040160405180910390fd5b8051600280546001600160a01b03199081166001600160a01b0393841617909155602080840180516003805485169186169190911790556040808601805160048054871691881691909117905560608088018051600580549098169089161790965582516080808201855280516001600160401b031680835260a080518b16848a0190815260c080518d16868a0190815260e080518f169789019788528a5195865292518e169b85019b909b5299518c169783019790975292518a169381019390935289518916908301529351871693810193909352518516928201929092529151909216918101919091527f23a1adf8ad7fad6091a4803227af2cee848c01a7c812404cade7c25636925e32906101000160405180910390a150565b604051608081016001600160401b0381118282101715620003b857634e487b7160e01b600052604160045260246000fd5b60405290565b80516001600160a01b0381168114620003d657600080fd5b919050565b600080828403610100811215620003f157600080fd5b60808112156200040057600080fd5b6200040a62000387565b84516001600160401b03811681146200042257600080fd5b81526200043260208601620003be565b60208201526200044560408601620003be565b60408201526200045860608601620003be565b606082015292506080607f19820112156200047257600080fd5b506200047d62000387565b6200048b60808501620003be565b81526200049b60a08501620003be565b6020820152620004ae60c08501620003be565b6040820152620004c160e08501620003be565b6060820152809150509250929050565b60805160a05160c05160e0516126e96200054a600039600081816101a60152818161073a0152610b8901526000818161017701528181610b6201526111f8015260008181610148015281816103f30152610b3801526000818161011801528181610b0b01528181610df201526112b701526126e96000f3fe608060405234801561001057600080fd5b50600436106100df5760003560e01c806379ba50971161008c578063a6f3ab6c11610066578063a6f3ab6c14610343578063df0aa9e914610356578063f2fde38b14610369578063fbca3b741461037c57600080fd5b806379ba5097146102fe5780638da5cb5b146103065780639041be3d1461031757600080fd5b80633a019940116100bd5780633a0199401461025657806348a98aa4146102605780637437ff9f1461028b57600080fd5b806306285c69146100e4578063181f5a77146101ec57806320487ded14610235575b600080fd5b6101d660408051608081018252600080825260208201819052918101829052606081019190915260405180608001604052807f000000000000000000000000000000000000000000000000000000000000000067ffffffffffffffff1681526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031681526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031681526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316815250905090565b6040516101e391906119e7565b60405180910390f35b6102286040518060400160405280601c81526020017f45564d3245564d4d756c74694f6e52616d7020312e362e302d6465760000000081525081565b6040516101e39190611a81565b610248610243366004611ac2565b61039c565b6040519081526020016101e3565b61025e61053b565b005b61027361026e366004611b27565b6106ff565b6040516001600160a01b0390911681526020016101e3565b6102f160408051608081018252600080825260208201819052918101829052606081019190915250604080516080810182526002546001600160a01b03908116825260035481166020830152600454811692820192909252600554909116606082015290565b6040516101e39190611b60565b61025e6107a7565b6000546001600160a01b0316610273565b61032a610325366004611b9c565b610870565b60405167ffffffffffffffff90911681526020016101e3565b61025e610351366004611c52565b610899565b610248610364366004611cd7565b6108ad565b61025e610377366004611d43565b61090d565b61038f61038a366004611b9c565b61091e565b6040516101e39190611d60565b6040517f2cbc26bb00000000000000000000000000000000000000000000000000000000815277ffffffffffffffff00000000000000000000000000000000608084901b1660048201526000906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690632cbc26bb90602401602060405180830381865afa15801561043a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061045e9190611dbd565b156104a6576040517ffdbd6a7200000000000000000000000000000000000000000000000000000000815267ffffffffffffffff841660048201526024015b60405180910390fd5b6003546040517fd8694ccd0000000000000000000000000000000000000000000000000000000081526001600160a01b039091169063d8694ccd906104f19086908690600401611ea3565b602060405180830381865afa15801561050e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105329190611fc1565b90505b92915050565b600354604080517fcdc73d5100000000000000000000000000000000000000000000000000000000815290516000926001600160a01b03169163cdc73d5191600480830192869291908290030181865afa15801561059d573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526105c59190810190611fda565b6005549091506001600160a01b031660005b82518110156106fa5760008382815181106105f4576105f461208c565b60209081029190910101516040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529091506000906001600160a01b038316906370a0823190602401602060405180830381865afa158015610662573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106869190611fc1565b905080156106f0576106a26001600160a01b0383168583610952565b816001600160a01b0316846001600160a01b03167f508d7d183612c18fc339b42618912b9fa3239f631dd7ec0671f950200a0fa66e836040516106e791815260200190565b60405180910390a35b50506001016105d7565b505050565b6040517fbbe4f6db0000000000000000000000000000000000000000000000000000000081526001600160a01b0382811660048301526000917f00000000000000000000000000000000000000000000000000000000000000009091169063bbe4f6db90602401602060405180830381865afa158015610783573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061053291906120bb565b6001546001600160a01b031633146108015760405162461bcd60e51b815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e657200000000000000000000604482015260640161049d565b60008054337fffffffffffffffffffffffff0000000000000000000000000000000000000000808316821784556001805490911690556040516001600160a01b0390921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b67ffffffffffffffff808216600090815260066020526040812054909161053591166001612107565b6108a16109d2565b6108aa81610a2e565b50565b6000806108bc86868686610bec565b90508567ffffffffffffffff167f0f07cd31e53232da9125e517f09550fdde74bf43d6a0a76ebd41674dafe2ab29826040516108f891906122cd565b60405180910390a2515190505b949350505050565b6109156109d2565b6108aa81611325565b60606040517f9e7177c800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001790526106fa9084906113e6565b6000546001600160a01b03163314610a2c5760405162461bcd60e51b815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000604482015260640161049d565b565b60208101516001600160a01b03161580610a53575060608101516001600160a01b0316155b15610a8a576040517f35be3ac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8051600280547fffffffffffffffffffffffff00000000000000000000000000000000000000009081166001600160a01b0393841617909155602080840151600380548416918516919091179055604080850151600480548516918616919091179055606080860151600580549095169086161790935580516080810182527f000000000000000000000000000000000000000000000000000000000000000067ffffffffffffffff1681527f00000000000000000000000000000000000000000000000000000000000000008516928101929092527f00000000000000000000000000000000000000000000000000000000000000008416828201527f00000000000000000000000000000000000000000000000000000000000000009093169181019190915290517f23a1adf8ad7fad6091a4803227af2cee848c01a7c812404cade7c25636925e3291610be19184906122e0565b60405180910390a150565b604080516101a08101825260006101008201818152610120830182905261014083018290526101608301829052610180830182905282526020820181905260609282018390528282018390526080820183905260a0820181905260c082015260e08101919091526001600160a01b038216610c93576040517fa4ec747900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002546001600160a01b03163314610cd7576040517f1c0a352900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6004546001600160a01b03168015610dc3576040517fe0a0e5060000000000000000000000000000000000000000000000000000000081526001600160a01b0382169063e0a0e50690610d309089908990600401611ea3565b600060405180830381600087803b158015610d4a57600080fd5b505af1925050508015610d5b575060015b610dc3573d808015610d89576040519150601f19603f3d011682016040523d82523d6000602084013e610d8e565b606091505b50806040517f09c2532500000000000000000000000000000000000000000000000000000000815260040161049d9190611a81565b6000610dd26040870187612365565b604080516101a0810182526000610100820181815267ffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000081166101208501528d8116610140850181905283526006602052938220805495975091955091938493610160850192918791610e4d91166123af565b91906101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905567ffffffffffffffff168152602001600067ffffffffffffffff168152508152602001866001600160a01b03168152602001888060200190610eb491906123d6565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250505090825250602001610ef889806123d6565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250505090825250602001610f3f60808a018a6123d6565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250505090825250602001610f8960808a0160608b01611d43565b6001600160a01b031681526020018781526020018367ffffffffffffffff811115610fb657610fb6611bb9565b60405190808252806020026020018201604052801561101257816020015b610fff6040518060800160405280606081526020016060815260200160608152602001600081525090565b815260200190600190039081610fd45790505b509052905060005b828110156110c85761109f61103260408a018a612365565b838181106110425761104261208c565b905060400201803603810190611058919061241d565b8a6110638b806123d6565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508c92506114cb915050565b8260e0015182815181106110b5576110b561208c565b602090810291909101015260010161101a565b50600354600090819081906001600160a01b031663997fb26b856110ef60408e018e612365565b6040518463ffffffff1660e01b815260040161110d93929190612457565b600060405180830381865afa15801561112a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261115291908101906124eb565b9194509250905061116960808b0160608c01611d43565b6001600160a01b03167f075a2720282fdf622141dae0b048ef90a21a7e57c134c76912d19d006b3b3f6f846040516111a391815260200190565b60405180910390a28161127a576040517fea458c0c00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff8c1660048201526001600160a01b0389811660248301527f0000000000000000000000000000000000000000000000000000000000000000169063ea458c0c906044016020604051808303816000875af1158015611241573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112659190612542565b845167ffffffffffffffff9091166080909101525b6080808501829052604080517f130ac867e79e2789f923760a88743d292acdf7002139a588206e2260f73f7321602082015267ffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000811692820192909252908d166060820152309181019190915261131390859060a0016040516020818303038152906040528051906020012061175c565b84515250919998505050505050505050565b336001600160a01b0382160361137d5760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640161049d565b600180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b600061143b826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661183e9092919063ffffffff16565b8051909150156106fa57808060200190518101906114599190611dbd565b6106fa5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f74207375636365656400000000000000000000000000000000000000000000606482015260840161049d565b6114f66040518060800160405280606081526020016060815260200160608152602001600081525090565b8460200151600003611534576040517f5cf0444900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006115448587600001516106ff565b90506001600160a01b03811615806115fa57506040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527faff2afbf0000000000000000000000000000000000000000000000000000000060048201526001600160a01b038216906301ffc9a790602401602060405180830381865afa1580156115d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115f89190611dbd565b155b1561163f5785516040517fbf16aab60000000000000000000000000000000000000000000000000000000081526001600160a01b03909116600482015260240161049d565b6000816001600160a01b0316639a4575b96040518060a001604052808881526020018967ffffffffffffffff168152602001876001600160a01b031681526020018a6020015181526020018a600001516001600160a01b03168152506040518263ffffffff1660e01b81526004016116b7919061255f565b6000604051808303816000875af11580156116d6573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526116fe91908101906125c8565b60408051608081019091526001600160a01b03841660a08201529091508060c0810160405160208183030381529060405281526020018260000151815260200182602001518152602001886020015181525092505050949350505050565b60008060001b82846020015185606001518660000151606001518760000151608001518860a001518960c0015160405160200161179e96959493929190612659565b604051602081830303815290604052805190602001208560400151805190602001208660e001516040516020016117d591906126ad565b60408051601f1981840301815282825280516020918201206080808c0151805190840120928501989098529183019590955260608201939093529384015260a083015260c082015260e00160405160208183030381529060405280519060200120905092915050565b606061184d8484600085611857565b90505b9392505050565b6060824710156118cf5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c0000000000000000000000000000000000000000000000000000606482015260840161049d565b600080866001600160a01b031685876040516118eb91906126c0565b60006040518083038185875af1925050503d8060008114611928576040519150601f19603f3d011682016040523d82523d6000602084013e61192d565b606091505b509150915061193e87838387611949565b979650505050505050565b606083156119b85782516000036119b1576001600160a01b0385163b6119b15760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161049d565b5081610905565b61090583838151156119cd5781518083602001fd5b8060405162461bcd60e51b815260040161049d9190611a81565b60808101610535828467ffffffffffffffff815116825260208101516001600160a01b03808216602085015280604084015116604085015280606084015116606085015250505050565b60005b83811015611a4c578181015183820152602001611a34565b50506000910152565b60008151808452611a6d816020860160208601611a31565b601f01601f19169290920160200192915050565b6020815260006105326020830184611a55565b67ffffffffffffffff811681146108aa57600080fd5b600060a08284031215611abc57600080fd5b50919050565b60008060408385031215611ad557600080fd5b8235611ae081611a94565b9150602083013567ffffffffffffffff811115611afc57600080fd5b611b0885828601611aaa565b9150509250929050565b6001600160a01b03811681146108aa57600080fd5b60008060408385031215611b3a57600080fd5b8235611b4581611a94565b91506020830135611b5581611b12565b809150509250929050565b60808101610535828480516001600160a01b03908116835260208083015182169084015260408083015182169084015260609182015116910152565b600060208284031215611bae57600080fd5b813561185081611a94565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040805190810167ffffffffffffffff81118282101715611c0b57611c0b611bb9565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715611c3a57611c3a611bb9565b604052919050565b8035611c4d81611b12565b919050565b600060808284031215611c6457600080fd5b6040516080810181811067ffffffffffffffff82111715611c8757611c87611bb9565b6040528235611c9581611b12565b81526020830135611ca581611b12565b60208201526040830135611cb881611b12565b60408201526060830135611ccb81611b12565b60608201529392505050565b60008060008060808587031215611ced57600080fd5b8435611cf881611a94565b9350602085013567ffffffffffffffff811115611d1457600080fd5b611d2087828801611aaa565b935050604085013591506060850135611d3881611b12565b939692955090935050565b600060208284031215611d5557600080fd5b813561185081611b12565b6020808252825182820181905260009190848201906040850190845b81811015611da15783516001600160a01b031683529284019291840191600101611d7c565b50909695505050505050565b80518015158114611c4d57600080fd5b600060208284031215611dcf57600080fd5b61053282611dad565b6000808335601e19843603018112611def57600080fd5b830160208101925035905067ffffffffffffffff811115611e0f57600080fd5b803603821315611e1e57600080fd5b9250929050565b818352818160208501375060006020828401015260006020601f19601f840116840101905092915050565b8183526000602080850194508260005b85811015611e98578135611e7381611b12565b6001600160a01b03168752818301358388015260409687019690910190600101611e60565b509495945050505050565b600067ffffffffffffffff808516835260406020840152611ec48485611dd8565b60a06040860152611ed960e086018284611e25565b915050611ee96020860186611dd8565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc080878503016060880152611f1f848385611e25565b935060408801359250601e19883603018312611f3a57600080fd5b60209288019283019235915084821115611f5357600080fd5b8160061b3603831315611f6557600080fd5b80878503016080880152611f7a848385611e50565b9450611f8860608901611c42565b6001600160a01b03811660a08901529350611fa66080890189611dd8565b94509250808786030160c0880152505061193e838383611e25565b600060208284031215611fd357600080fd5b5051919050565b60006020808385031215611fed57600080fd5b825167ffffffffffffffff8082111561200557600080fd5b818501915085601f83011261201957600080fd5b81518181111561202b5761202b611bb9565b8060051b915061203c848301611c11565b818152918301840191848101908884111561205657600080fd5b938501935b83851015612080578451925061207083611b12565b828252938501939085019061205b565b98975050505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000602082840312156120cd57600080fd5b815161185081611b12565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b67ffffffffffffffff818116838216019080821115612128576121286120d8565b5092915050565b600082825180855260208086019550808260051b84010181860160005b848110156121c657601f1986840301895281516080815181865261217282870182611a55565b915050858201518582038787015261218a8282611a55565b915050604080830151868303828801526121a48382611a55565b606094850151979094019690965250509884019892509083019060010161214c565b5090979650505050505050565b600061018061222284845180518252602081015167ffffffffffffffff808216602085015280604084015116604085015280606084015116606085015280608084015116608085015250505050565b60208301516001600160a01b031660a0850152604083015160c0850182905261224d82860182611a55565b915050606083015184820360e08601526122678282611a55565b91505060808301518482036101008601526122828282611a55565b91505060a08301516122a06101208601826001600160a01b03169052565b5060c083015161014085015260e08301518482036101608601526122c4828261212f565b95945050505050565b60208152600061053260208301846121d3565b610100810161232b828567ffffffffffffffff815116825260208101516001600160a01b03808216602085015280604084015116604085015280606084015116606085015250505050565b82516001600160a01b0390811660808401526020840151811660a08401526040840151811660c084015260608401511660e0830152611850565b6000808335601e1984360301811261237c57600080fd5b83018035915067ffffffffffffffff82111561239757600080fd5b6020019150600681901b3603821315611e1e57600080fd5b600067ffffffffffffffff8083168181036123cc576123cc6120d8565b6001019392505050565b6000808335601e198436030181126123ed57600080fd5b83018035915067ffffffffffffffff82111561240857600080fd5b602001915036819003821315611e1e57600080fd5b60006040828403121561242f57600080fd5b612437611be8565b823561244281611b12565b81526020928301359281019290925250919050565b60408152600061246a60408301866121d3565b828103602084015261247d818587611e50565b9695505050505050565b600082601f83011261249857600080fd5b815167ffffffffffffffff8111156124b2576124b2611bb9565b6124c56020601f19601f84011601611c11565b8181528460208386010111156124da57600080fd5b610905826020830160208701611a31565b60008060006060848603121561250057600080fd5b8351925061251060208501611dad565b9150604084015167ffffffffffffffff81111561252c57600080fd5b61253886828701612487565b9150509250925092565b60006020828403121561255457600080fd5b815161185081611a94565b602081526000825160a0602084015261257b60c0840182611a55565b905067ffffffffffffffff602085015116604084015260408401516001600160a01b038082166060860152606086015160808601528060808701511660a086015250508091505092915050565b6000602082840312156125da57600080fd5b815167ffffffffffffffff808211156125f257600080fd5b908301906040828603121561260657600080fd5b61260e611be8565b82518281111561261d57600080fd5b61262987828601612487565b82525060208301518281111561263e57600080fd5b61264a87828601612487565b60208301525095945050505050565b60006001600160a01b03808916835260c0602084015261267c60c0840189611a55565b67ffffffffffffffff97881660408501529590961660608301525091909316608082015260a0019190915292915050565b602081526000610532602083018461212f565b600082516126d2818460208701611a31565b919091019291505056fea164736f6c6343000818000a", } var EVM2EVMMultiOnRampABI = EVM2EVMMultiOnRampMetaData.ABI var EVM2EVMMultiOnRampBin = EVM2EVMMultiOnRampMetaData.Bin -func DeployEVM2EVMMultiOnRamp(auth *bind.TransactOpts, backend bind.ContractBackend, staticConfig EVM2EVMMultiOnRampStaticConfig, dynamicConfig EVM2EVMMultiOnRampDynamicConfig, destChainConfigArgs []EVM2EVMMultiOnRampDestChainConfigArgs, premiumMultiplierWeiPerEthArgs []EVM2EVMMultiOnRampPremiumMultiplierWeiPerEthArgs, tokenTransferFeeConfigArgs []EVM2EVMMultiOnRampTokenTransferFeeConfigArgs) (common.Address, *types.Transaction, *EVM2EVMMultiOnRamp, error) { +func DeployEVM2EVMMultiOnRamp(auth *bind.TransactOpts, backend bind.ContractBackend, staticConfig EVM2EVMMultiOnRampStaticConfig, dynamicConfig EVM2EVMMultiOnRampDynamicConfig) (common.Address, *types.Transaction, *EVM2EVMMultiOnRamp, error) { parsed, err := EVM2EVMMultiOnRampMetaData.GetAbi() if err != nil { return common.Address{}, nil, nil, err @@ -163,7 +101,7 @@ func DeployEVM2EVMMultiOnRamp(auth *bind.TransactOpts, backend bind.ContractBack return common.Address{}, nil, nil, errors.New("GetABI returned nil") } - address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(EVM2EVMMultiOnRampBin), backend, staticConfig, dynamicConfig, destChainConfigArgs, premiumMultiplierWeiPerEthArgs, tokenTransferFeeConfigArgs) + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(EVM2EVMMultiOnRampBin), backend, staticConfig, dynamicConfig) if err != nil { return common.Address{}, nil, nil, err } @@ -286,28 +224,6 @@ func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRampTransactorRaw) Transact(opts *bind. return _EVM2EVMMultiOnRamp.Contract.contract.Transact(opts, method, params...) } -func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRampCaller) GetDestChainConfig(opts *bind.CallOpts, destChainSelector uint64) (EVM2EVMMultiOnRampDestChainConfig, error) { - var out []interface{} - err := _EVM2EVMMultiOnRamp.contract.Call(opts, &out, "getDestChainConfig", destChainSelector) - - if err != nil { - return *new(EVM2EVMMultiOnRampDestChainConfig), err - } - - out0 := *abi.ConvertType(out[0], new(EVM2EVMMultiOnRampDestChainConfig)).(*EVM2EVMMultiOnRampDestChainConfig) - - return out0, err - -} - -func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRampSession) GetDestChainConfig(destChainSelector uint64) (EVM2EVMMultiOnRampDestChainConfig, error) { - return _EVM2EVMMultiOnRamp.Contract.GetDestChainConfig(&_EVM2EVMMultiOnRamp.CallOpts, destChainSelector) -} - -func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRampCallerSession) GetDestChainConfig(destChainSelector uint64) (EVM2EVMMultiOnRampDestChainConfig, error) { - return _EVM2EVMMultiOnRamp.Contract.GetDestChainConfig(&_EVM2EVMMultiOnRamp.CallOpts, destChainSelector) -} - func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRampCaller) GetDynamicConfig(opts *bind.CallOpts) (EVM2EVMMultiOnRampDynamicConfig, error) { var out []interface{} err := _EVM2EVMMultiOnRamp.contract.Call(opts, &out, "getDynamicConfig") @@ -396,28 +312,6 @@ func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRampCallerSession) GetPoolBySourceToken return _EVM2EVMMultiOnRamp.Contract.GetPoolBySourceToken(&_EVM2EVMMultiOnRamp.CallOpts, arg0, sourceToken) } -func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRampCaller) GetPremiumMultiplierWeiPerEth(opts *bind.CallOpts, token common.Address) (uint64, error) { - var out []interface{} - err := _EVM2EVMMultiOnRamp.contract.Call(opts, &out, "getPremiumMultiplierWeiPerEth", token) - - if err != nil { - return *new(uint64), err - } - - out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) - - return out0, err - -} - -func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRampSession) GetPremiumMultiplierWeiPerEth(token common.Address) (uint64, error) { - return _EVM2EVMMultiOnRamp.Contract.GetPremiumMultiplierWeiPerEth(&_EVM2EVMMultiOnRamp.CallOpts, token) -} - -func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRampCallerSession) GetPremiumMultiplierWeiPerEth(token common.Address) (uint64, error) { - return _EVM2EVMMultiOnRamp.Contract.GetPremiumMultiplierWeiPerEth(&_EVM2EVMMultiOnRamp.CallOpts, token) -} - func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRampCaller) GetStaticConfig(opts *bind.CallOpts) (EVM2EVMMultiOnRampStaticConfig, error) { var out []interface{} err := _EVM2EVMMultiOnRamp.contract.Call(opts, &out, "getStaticConfig") @@ -462,28 +356,6 @@ func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRampCallerSession) GetSupportedTokens(a return _EVM2EVMMultiOnRamp.Contract.GetSupportedTokens(&_EVM2EVMMultiOnRamp.CallOpts, arg0) } -func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRampCaller) GetTokenTransferFeeConfig(opts *bind.CallOpts, destChainSelector uint64, token common.Address) (EVM2EVMMultiOnRampTokenTransferFeeConfig, error) { - var out []interface{} - err := _EVM2EVMMultiOnRamp.contract.Call(opts, &out, "getTokenTransferFeeConfig", destChainSelector, token) - - if err != nil { - return *new(EVM2EVMMultiOnRampTokenTransferFeeConfig), err - } - - out0 := *abi.ConvertType(out[0], new(EVM2EVMMultiOnRampTokenTransferFeeConfig)).(*EVM2EVMMultiOnRampTokenTransferFeeConfig) - - return out0, err - -} - -func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRampSession) GetTokenTransferFeeConfig(destChainSelector uint64, token common.Address) (EVM2EVMMultiOnRampTokenTransferFeeConfig, error) { - return _EVM2EVMMultiOnRamp.Contract.GetTokenTransferFeeConfig(&_EVM2EVMMultiOnRamp.CallOpts, destChainSelector, token) -} - -func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRampCallerSession) GetTokenTransferFeeConfig(destChainSelector uint64, token common.Address) (EVM2EVMMultiOnRampTokenTransferFeeConfig, error) { - return _EVM2EVMMultiOnRamp.Contract.GetTokenTransferFeeConfig(&_EVM2EVMMultiOnRamp.CallOpts, destChainSelector, token) -} - func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRampCaller) Owner(opts *bind.CallOpts) (common.Address, error) { var out []interface{} err := _EVM2EVMMultiOnRamp.contract.Call(opts, &out, "owner") @@ -540,42 +412,6 @@ func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRampTransactorSession) AcceptOwnership( return _EVM2EVMMultiOnRamp.Contract.AcceptOwnership(&_EVM2EVMMultiOnRamp.TransactOpts) } -func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRampTransactor) ApplyDestChainConfigUpdates(opts *bind.TransactOpts, destChainConfigArgs []EVM2EVMMultiOnRampDestChainConfigArgs) (*types.Transaction, error) { - return _EVM2EVMMultiOnRamp.contract.Transact(opts, "applyDestChainConfigUpdates", destChainConfigArgs) -} - -func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRampSession) ApplyDestChainConfigUpdates(destChainConfigArgs []EVM2EVMMultiOnRampDestChainConfigArgs) (*types.Transaction, error) { - return _EVM2EVMMultiOnRamp.Contract.ApplyDestChainConfigUpdates(&_EVM2EVMMultiOnRamp.TransactOpts, destChainConfigArgs) -} - -func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRampTransactorSession) ApplyDestChainConfigUpdates(destChainConfigArgs []EVM2EVMMultiOnRampDestChainConfigArgs) (*types.Transaction, error) { - return _EVM2EVMMultiOnRamp.Contract.ApplyDestChainConfigUpdates(&_EVM2EVMMultiOnRamp.TransactOpts, destChainConfigArgs) -} - -func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRampTransactor) ApplyPremiumMultiplierWeiPerEthUpdates(opts *bind.TransactOpts, premiumMultiplierWeiPerEthArgs []EVM2EVMMultiOnRampPremiumMultiplierWeiPerEthArgs) (*types.Transaction, error) { - return _EVM2EVMMultiOnRamp.contract.Transact(opts, "applyPremiumMultiplierWeiPerEthUpdates", premiumMultiplierWeiPerEthArgs) -} - -func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRampSession) ApplyPremiumMultiplierWeiPerEthUpdates(premiumMultiplierWeiPerEthArgs []EVM2EVMMultiOnRampPremiumMultiplierWeiPerEthArgs) (*types.Transaction, error) { - return _EVM2EVMMultiOnRamp.Contract.ApplyPremiumMultiplierWeiPerEthUpdates(&_EVM2EVMMultiOnRamp.TransactOpts, premiumMultiplierWeiPerEthArgs) -} - -func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRampTransactorSession) ApplyPremiumMultiplierWeiPerEthUpdates(premiumMultiplierWeiPerEthArgs []EVM2EVMMultiOnRampPremiumMultiplierWeiPerEthArgs) (*types.Transaction, error) { - return _EVM2EVMMultiOnRamp.Contract.ApplyPremiumMultiplierWeiPerEthUpdates(&_EVM2EVMMultiOnRamp.TransactOpts, premiumMultiplierWeiPerEthArgs) -} - -func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRampTransactor) ApplyTokenTransferFeeConfigUpdates(opts *bind.TransactOpts, tokenTransferFeeConfigArgs []EVM2EVMMultiOnRampTokenTransferFeeConfigArgs, tokensToUseDefaultFeeConfigs []EVM2EVMMultiOnRampTokenTransferFeeConfigRemoveArgs) (*types.Transaction, error) { - return _EVM2EVMMultiOnRamp.contract.Transact(opts, "applyTokenTransferFeeConfigUpdates", tokenTransferFeeConfigArgs, tokensToUseDefaultFeeConfigs) -} - -func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRampSession) ApplyTokenTransferFeeConfigUpdates(tokenTransferFeeConfigArgs []EVM2EVMMultiOnRampTokenTransferFeeConfigArgs, tokensToUseDefaultFeeConfigs []EVM2EVMMultiOnRampTokenTransferFeeConfigRemoveArgs) (*types.Transaction, error) { - return _EVM2EVMMultiOnRamp.Contract.ApplyTokenTransferFeeConfigUpdates(&_EVM2EVMMultiOnRamp.TransactOpts, tokenTransferFeeConfigArgs, tokensToUseDefaultFeeConfigs) -} - -func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRampTransactorSession) ApplyTokenTransferFeeConfigUpdates(tokenTransferFeeConfigArgs []EVM2EVMMultiOnRampTokenTransferFeeConfigArgs, tokensToUseDefaultFeeConfigs []EVM2EVMMultiOnRampTokenTransferFeeConfigRemoveArgs) (*types.Transaction, error) { - return _EVM2EVMMultiOnRamp.Contract.ApplyTokenTransferFeeConfigUpdates(&_EVM2EVMMultiOnRamp.TransactOpts, tokenTransferFeeConfigArgs, tokensToUseDefaultFeeConfigs) -} - func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRampTransactor) ForwardFromRouter(opts *bind.TransactOpts, destChainSelector uint64, message ClientEVM2AnyMessage, feeTokenAmount *big.Int, originalSender common.Address) (*types.Transaction, error) { return _EVM2EVMMultiOnRamp.contract.Transact(opts, "forwardFromRouter", destChainSelector, message, feeTokenAmount, originalSender) } @@ -987,8 +823,8 @@ func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRampFilterer) ParseConfigSet(log types. return event, nil } -type EVM2EVMMultiOnRampDestChainAddedIterator struct { - Event *EVM2EVMMultiOnRampDestChainAdded +type EVM2EVMMultiOnRampFeePaidIterator struct { + Event *EVM2EVMMultiOnRampFeePaid contract *bind.BoundContract event string @@ -999,7 +835,7 @@ type EVM2EVMMultiOnRampDestChainAddedIterator struct { fail error } -func (it *EVM2EVMMultiOnRampDestChainAddedIterator) Next() bool { +func (it *EVM2EVMMultiOnRampFeePaidIterator) Next() bool { if it.fail != nil { return false @@ -1008,7 +844,7 @@ func (it *EVM2EVMMultiOnRampDestChainAddedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(EVM2EVMMultiOnRampDestChainAdded) + it.Event = new(EVM2EVMMultiOnRampFeePaid) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1023,7 +859,7 @@ func (it *EVM2EVMMultiOnRampDestChainAddedIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(EVM2EVMMultiOnRampDestChainAdded) + it.Event = new(EVM2EVMMultiOnRampFeePaid) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1038,43 +874,43 @@ func (it *EVM2EVMMultiOnRampDestChainAddedIterator) Next() bool { } } -func (it *EVM2EVMMultiOnRampDestChainAddedIterator) Error() error { +func (it *EVM2EVMMultiOnRampFeePaidIterator) Error() error { return it.fail } -func (it *EVM2EVMMultiOnRampDestChainAddedIterator) Close() error { +func (it *EVM2EVMMultiOnRampFeePaidIterator) Close() error { it.sub.Unsubscribe() return nil } -type EVM2EVMMultiOnRampDestChainAdded struct { - DestChainSelector uint64 - DestChainConfig EVM2EVMMultiOnRampDestChainConfig - Raw types.Log +type EVM2EVMMultiOnRampFeePaid struct { + FeeToken common.Address + FeeValueJuels *big.Int + Raw types.Log } -func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRampFilterer) FilterDestChainAdded(opts *bind.FilterOpts, destChainSelector []uint64) (*EVM2EVMMultiOnRampDestChainAddedIterator, error) { +func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRampFilterer) FilterFeePaid(opts *bind.FilterOpts, feeToken []common.Address) (*EVM2EVMMultiOnRampFeePaidIterator, error) { - var destChainSelectorRule []interface{} - for _, destChainSelectorItem := range destChainSelector { - destChainSelectorRule = append(destChainSelectorRule, destChainSelectorItem) + var feeTokenRule []interface{} + for _, feeTokenItem := range feeToken { + feeTokenRule = append(feeTokenRule, feeTokenItem) } - logs, sub, err := _EVM2EVMMultiOnRamp.contract.FilterLogs(opts, "DestChainAdded", destChainSelectorRule) + logs, sub, err := _EVM2EVMMultiOnRamp.contract.FilterLogs(opts, "FeePaid", feeTokenRule) if err != nil { return nil, err } - return &EVM2EVMMultiOnRampDestChainAddedIterator{contract: _EVM2EVMMultiOnRamp.contract, event: "DestChainAdded", logs: logs, sub: sub}, nil + return &EVM2EVMMultiOnRampFeePaidIterator{contract: _EVM2EVMMultiOnRamp.contract, event: "FeePaid", logs: logs, sub: sub}, nil } -func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRampFilterer) WatchDestChainAdded(opts *bind.WatchOpts, sink chan<- *EVM2EVMMultiOnRampDestChainAdded, destChainSelector []uint64) (event.Subscription, error) { +func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRampFilterer) WatchFeePaid(opts *bind.WatchOpts, sink chan<- *EVM2EVMMultiOnRampFeePaid, feeToken []common.Address) (event.Subscription, error) { - var destChainSelectorRule []interface{} - for _, destChainSelectorItem := range destChainSelector { - destChainSelectorRule = append(destChainSelectorRule, destChainSelectorItem) + var feeTokenRule []interface{} + for _, feeTokenItem := range feeToken { + feeTokenRule = append(feeTokenRule, feeTokenItem) } - logs, sub, err := _EVM2EVMMultiOnRamp.contract.WatchLogs(opts, "DestChainAdded", destChainSelectorRule) + logs, sub, err := _EVM2EVMMultiOnRamp.contract.WatchLogs(opts, "FeePaid", feeTokenRule) if err != nil { return nil, err } @@ -1084,8 +920,8 @@ func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRampFilterer) WatchDestChainAdded(opts select { case log := <-logs: - event := new(EVM2EVMMultiOnRampDestChainAdded) - if err := _EVM2EVMMultiOnRamp.contract.UnpackLog(event, "DestChainAdded", log); err != nil { + event := new(EVM2EVMMultiOnRampFeePaid) + if err := _EVM2EVMMultiOnRamp.contract.UnpackLog(event, "FeePaid", log); err != nil { return err } event.Raw = log @@ -1106,17 +942,17 @@ func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRampFilterer) WatchDestChainAdded(opts }), nil } -func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRampFilterer) ParseDestChainAdded(log types.Log) (*EVM2EVMMultiOnRampDestChainAdded, error) { - event := new(EVM2EVMMultiOnRampDestChainAdded) - if err := _EVM2EVMMultiOnRamp.contract.UnpackLog(event, "DestChainAdded", log); err != nil { +func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRampFilterer) ParseFeePaid(log types.Log) (*EVM2EVMMultiOnRampFeePaid, error) { + event := new(EVM2EVMMultiOnRampFeePaid) + if err := _EVM2EVMMultiOnRamp.contract.UnpackLog(event, "FeePaid", log); err != nil { return nil, err } event.Raw = log return event, nil } -type EVM2EVMMultiOnRampDestChainDynamicConfigUpdatedIterator struct { - Event *EVM2EVMMultiOnRampDestChainDynamicConfigUpdated +type EVM2EVMMultiOnRampFeeTokenWithdrawnIterator struct { + Event *EVM2EVMMultiOnRampFeeTokenWithdrawn contract *bind.BoundContract event string @@ -1127,7 +963,7 @@ type EVM2EVMMultiOnRampDestChainDynamicConfigUpdatedIterator struct { fail error } -func (it *EVM2EVMMultiOnRampDestChainDynamicConfigUpdatedIterator) Next() bool { +func (it *EVM2EVMMultiOnRampFeeTokenWithdrawnIterator) Next() bool { if it.fail != nil { return false @@ -1136,7 +972,7 @@ func (it *EVM2EVMMultiOnRampDestChainDynamicConfigUpdatedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(EVM2EVMMultiOnRampDestChainDynamicConfigUpdated) + it.Event = new(EVM2EVMMultiOnRampFeeTokenWithdrawn) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1151,7 +987,7 @@ func (it *EVM2EVMMultiOnRampDestChainDynamicConfigUpdatedIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(EVM2EVMMultiOnRampDestChainDynamicConfigUpdated) + it.Event = new(EVM2EVMMultiOnRampFeeTokenWithdrawn) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1166,43 +1002,52 @@ func (it *EVM2EVMMultiOnRampDestChainDynamicConfigUpdatedIterator) Next() bool { } } -func (it *EVM2EVMMultiOnRampDestChainDynamicConfigUpdatedIterator) Error() error { +func (it *EVM2EVMMultiOnRampFeeTokenWithdrawnIterator) Error() error { return it.fail } -func (it *EVM2EVMMultiOnRampDestChainDynamicConfigUpdatedIterator) Close() error { +func (it *EVM2EVMMultiOnRampFeeTokenWithdrawnIterator) Close() error { it.sub.Unsubscribe() return nil } -type EVM2EVMMultiOnRampDestChainDynamicConfigUpdated struct { - DestChainSelector uint64 - DynamicConfig EVM2EVMMultiOnRampDestChainDynamicConfig - Raw types.Log +type EVM2EVMMultiOnRampFeeTokenWithdrawn struct { + FeeAggregator common.Address + FeeToken common.Address + Amount *big.Int + Raw types.Log } -func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRampFilterer) FilterDestChainDynamicConfigUpdated(opts *bind.FilterOpts, destChainSelector []uint64) (*EVM2EVMMultiOnRampDestChainDynamicConfigUpdatedIterator, error) { +func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRampFilterer) FilterFeeTokenWithdrawn(opts *bind.FilterOpts, feeAggregator []common.Address, feeToken []common.Address) (*EVM2EVMMultiOnRampFeeTokenWithdrawnIterator, error) { - var destChainSelectorRule []interface{} - for _, destChainSelectorItem := range destChainSelector { - destChainSelectorRule = append(destChainSelectorRule, destChainSelectorItem) + var feeAggregatorRule []interface{} + for _, feeAggregatorItem := range feeAggregator { + feeAggregatorRule = append(feeAggregatorRule, feeAggregatorItem) + } + var feeTokenRule []interface{} + for _, feeTokenItem := range feeToken { + feeTokenRule = append(feeTokenRule, feeTokenItem) } - logs, sub, err := _EVM2EVMMultiOnRamp.contract.FilterLogs(opts, "DestChainDynamicConfigUpdated", destChainSelectorRule) + logs, sub, err := _EVM2EVMMultiOnRamp.contract.FilterLogs(opts, "FeeTokenWithdrawn", feeAggregatorRule, feeTokenRule) if err != nil { return nil, err } - return &EVM2EVMMultiOnRampDestChainDynamicConfigUpdatedIterator{contract: _EVM2EVMMultiOnRamp.contract, event: "DestChainDynamicConfigUpdated", logs: logs, sub: sub}, nil + return &EVM2EVMMultiOnRampFeeTokenWithdrawnIterator{contract: _EVM2EVMMultiOnRamp.contract, event: "FeeTokenWithdrawn", logs: logs, sub: sub}, nil } -func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRampFilterer) WatchDestChainDynamicConfigUpdated(opts *bind.WatchOpts, sink chan<- *EVM2EVMMultiOnRampDestChainDynamicConfigUpdated, destChainSelector []uint64) (event.Subscription, error) { +func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRampFilterer) WatchFeeTokenWithdrawn(opts *bind.WatchOpts, sink chan<- *EVM2EVMMultiOnRampFeeTokenWithdrawn, feeAggregator []common.Address, feeToken []common.Address) (event.Subscription, error) { - var destChainSelectorRule []interface{} - for _, destChainSelectorItem := range destChainSelector { - destChainSelectorRule = append(destChainSelectorRule, destChainSelectorItem) + var feeAggregatorRule []interface{} + for _, feeAggregatorItem := range feeAggregator { + feeAggregatorRule = append(feeAggregatorRule, feeAggregatorItem) + } + var feeTokenRule []interface{} + for _, feeTokenItem := range feeToken { + feeTokenRule = append(feeTokenRule, feeTokenItem) } - logs, sub, err := _EVM2EVMMultiOnRamp.contract.WatchLogs(opts, "DestChainDynamicConfigUpdated", destChainSelectorRule) + logs, sub, err := _EVM2EVMMultiOnRamp.contract.WatchLogs(opts, "FeeTokenWithdrawn", feeAggregatorRule, feeTokenRule) if err != nil { return nil, err } @@ -1212,8 +1057,8 @@ func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRampFilterer) WatchDestChainDynamicConf select { case log := <-logs: - event := new(EVM2EVMMultiOnRampDestChainDynamicConfigUpdated) - if err := _EVM2EVMMultiOnRamp.contract.UnpackLog(event, "DestChainDynamicConfigUpdated", log); err != nil { + event := new(EVM2EVMMultiOnRampFeeTokenWithdrawn) + if err := _EVM2EVMMultiOnRamp.contract.UnpackLog(event, "FeeTokenWithdrawn", log); err != nil { return err } event.Raw = log @@ -1234,17 +1079,17 @@ func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRampFilterer) WatchDestChainDynamicConf }), nil } -func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRampFilterer) ParseDestChainDynamicConfigUpdated(log types.Log) (*EVM2EVMMultiOnRampDestChainDynamicConfigUpdated, error) { - event := new(EVM2EVMMultiOnRampDestChainDynamicConfigUpdated) - if err := _EVM2EVMMultiOnRamp.contract.UnpackLog(event, "DestChainDynamicConfigUpdated", log); err != nil { +func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRampFilterer) ParseFeeTokenWithdrawn(log types.Log) (*EVM2EVMMultiOnRampFeeTokenWithdrawn, error) { + event := new(EVM2EVMMultiOnRampFeeTokenWithdrawn) + if err := _EVM2EVMMultiOnRamp.contract.UnpackLog(event, "FeeTokenWithdrawn", log); err != nil { return nil, err } event.Raw = log return event, nil } -type EVM2EVMMultiOnRampFeePaidIterator struct { - Event *EVM2EVMMultiOnRampFeePaid +type EVM2EVMMultiOnRampOwnershipTransferRequestedIterator struct { + Event *EVM2EVMMultiOnRampOwnershipTransferRequested contract *bind.BoundContract event string @@ -1255,7 +1100,7 @@ type EVM2EVMMultiOnRampFeePaidIterator struct { fail error } -func (it *EVM2EVMMultiOnRampFeePaidIterator) Next() bool { +func (it *EVM2EVMMultiOnRampOwnershipTransferRequestedIterator) Next() bool { if it.fail != nil { return false @@ -1264,7 +1109,7 @@ func (it *EVM2EVMMultiOnRampFeePaidIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(EVM2EVMMultiOnRampFeePaid) + it.Event = new(EVM2EVMMultiOnRampOwnershipTransferRequested) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1279,7 +1124,7 @@ func (it *EVM2EVMMultiOnRampFeePaidIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(EVM2EVMMultiOnRampFeePaid) + it.Event = new(EVM2EVMMultiOnRampOwnershipTransferRequested) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1294,43 +1139,51 @@ func (it *EVM2EVMMultiOnRampFeePaidIterator) Next() bool { } } -func (it *EVM2EVMMultiOnRampFeePaidIterator) Error() error { +func (it *EVM2EVMMultiOnRampOwnershipTransferRequestedIterator) Error() error { return it.fail } -func (it *EVM2EVMMultiOnRampFeePaidIterator) Close() error { +func (it *EVM2EVMMultiOnRampOwnershipTransferRequestedIterator) Close() error { it.sub.Unsubscribe() return nil } -type EVM2EVMMultiOnRampFeePaid struct { - FeeToken common.Address - FeeValueJuels *big.Int - Raw types.Log +type EVM2EVMMultiOnRampOwnershipTransferRequested struct { + From common.Address + To common.Address + Raw types.Log } -func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRampFilterer) FilterFeePaid(opts *bind.FilterOpts, feeToken []common.Address) (*EVM2EVMMultiOnRampFeePaidIterator, error) { +func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRampFilterer) FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*EVM2EVMMultiOnRampOwnershipTransferRequestedIterator, error) { - var feeTokenRule []interface{} - for _, feeTokenItem := range feeToken { - feeTokenRule = append(feeTokenRule, feeTokenItem) + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) } - logs, sub, err := _EVM2EVMMultiOnRamp.contract.FilterLogs(opts, "FeePaid", feeTokenRule) + logs, sub, err := _EVM2EVMMultiOnRamp.contract.FilterLogs(opts, "OwnershipTransferRequested", fromRule, toRule) if err != nil { return nil, err } - return &EVM2EVMMultiOnRampFeePaidIterator{contract: _EVM2EVMMultiOnRamp.contract, event: "FeePaid", logs: logs, sub: sub}, nil + return &EVM2EVMMultiOnRampOwnershipTransferRequestedIterator{contract: _EVM2EVMMultiOnRamp.contract, event: "OwnershipTransferRequested", logs: logs, sub: sub}, nil } -func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRampFilterer) WatchFeePaid(opts *bind.WatchOpts, sink chan<- *EVM2EVMMultiOnRampFeePaid, feeToken []common.Address) (event.Subscription, error) { +func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRampFilterer) WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *EVM2EVMMultiOnRampOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) { - var feeTokenRule []interface{} - for _, feeTokenItem := range feeToken { - feeTokenRule = append(feeTokenRule, feeTokenItem) + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) } - logs, sub, err := _EVM2EVMMultiOnRamp.contract.WatchLogs(opts, "FeePaid", feeTokenRule) + logs, sub, err := _EVM2EVMMultiOnRamp.contract.WatchLogs(opts, "OwnershipTransferRequested", fromRule, toRule) if err != nil { return nil, err } @@ -1340,8 +1193,8 @@ func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRampFilterer) WatchFeePaid(opts *bind.W select { case log := <-logs: - event := new(EVM2EVMMultiOnRampFeePaid) - if err := _EVM2EVMMultiOnRamp.contract.UnpackLog(event, "FeePaid", log); err != nil { + event := new(EVM2EVMMultiOnRampOwnershipTransferRequested) + if err := _EVM2EVMMultiOnRamp.contract.UnpackLog(event, "OwnershipTransferRequested", log); err != nil { return err } event.Raw = log @@ -1362,17 +1215,17 @@ func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRampFilterer) WatchFeePaid(opts *bind.W }), nil } -func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRampFilterer) ParseFeePaid(log types.Log) (*EVM2EVMMultiOnRampFeePaid, error) { - event := new(EVM2EVMMultiOnRampFeePaid) - if err := _EVM2EVMMultiOnRamp.contract.UnpackLog(event, "FeePaid", log); err != nil { +func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRampFilterer) ParseOwnershipTransferRequested(log types.Log) (*EVM2EVMMultiOnRampOwnershipTransferRequested, error) { + event := new(EVM2EVMMultiOnRampOwnershipTransferRequested) + if err := _EVM2EVMMultiOnRamp.contract.UnpackLog(event, "OwnershipTransferRequested", log); err != nil { return nil, err } event.Raw = log return event, nil } -type EVM2EVMMultiOnRampFeeTokenWithdrawnIterator struct { - Event *EVM2EVMMultiOnRampFeeTokenWithdrawn +type EVM2EVMMultiOnRampOwnershipTransferredIterator struct { + Event *EVM2EVMMultiOnRampOwnershipTransferred contract *bind.BoundContract event string @@ -1383,7 +1236,7 @@ type EVM2EVMMultiOnRampFeeTokenWithdrawnIterator struct { fail error } -func (it *EVM2EVMMultiOnRampFeeTokenWithdrawnIterator) Next() bool { +func (it *EVM2EVMMultiOnRampOwnershipTransferredIterator) Next() bool { if it.fail != nil { return false @@ -1392,7 +1245,7 @@ func (it *EVM2EVMMultiOnRampFeeTokenWithdrawnIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(EVM2EVMMultiOnRampFeeTokenWithdrawn) + it.Event = new(EVM2EVMMultiOnRampOwnershipTransferred) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1407,7 +1260,7 @@ func (it *EVM2EVMMultiOnRampFeeTokenWithdrawnIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(EVM2EVMMultiOnRampFeeTokenWithdrawn) + it.Event = new(EVM2EVMMultiOnRampOwnershipTransferred) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1422,725 +1275,51 @@ func (it *EVM2EVMMultiOnRampFeeTokenWithdrawnIterator) Next() bool { } } -func (it *EVM2EVMMultiOnRampFeeTokenWithdrawnIterator) Error() error { +func (it *EVM2EVMMultiOnRampOwnershipTransferredIterator) Error() error { return it.fail } -func (it *EVM2EVMMultiOnRampFeeTokenWithdrawnIterator) Close() error { +func (it *EVM2EVMMultiOnRampOwnershipTransferredIterator) Close() error { it.sub.Unsubscribe() return nil } -type EVM2EVMMultiOnRampFeeTokenWithdrawn struct { - FeeAggregator common.Address - FeeToken common.Address - Amount *big.Int - Raw types.Log +type EVM2EVMMultiOnRampOwnershipTransferred struct { + From common.Address + To common.Address + Raw types.Log } -func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRampFilterer) FilterFeeTokenWithdrawn(opts *bind.FilterOpts, feeAggregator []common.Address, feeToken []common.Address) (*EVM2EVMMultiOnRampFeeTokenWithdrawnIterator, error) { +func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRampFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*EVM2EVMMultiOnRampOwnershipTransferredIterator, error) { - var feeAggregatorRule []interface{} - for _, feeAggregatorItem := range feeAggregator { - feeAggregatorRule = append(feeAggregatorRule, feeAggregatorItem) + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) } - var feeTokenRule []interface{} - for _, feeTokenItem := range feeToken { - feeTokenRule = append(feeTokenRule, feeTokenItem) + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) } - logs, sub, err := _EVM2EVMMultiOnRamp.contract.FilterLogs(opts, "FeeTokenWithdrawn", feeAggregatorRule, feeTokenRule) - if err != nil { - return nil, err - } - return &EVM2EVMMultiOnRampFeeTokenWithdrawnIterator{contract: _EVM2EVMMultiOnRamp.contract, event: "FeeTokenWithdrawn", logs: logs, sub: sub}, nil -} - -func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRampFilterer) WatchFeeTokenWithdrawn(opts *bind.WatchOpts, sink chan<- *EVM2EVMMultiOnRampFeeTokenWithdrawn, feeAggregator []common.Address, feeToken []common.Address) (event.Subscription, error) { - - var feeAggregatorRule []interface{} - for _, feeAggregatorItem := range feeAggregator { - feeAggregatorRule = append(feeAggregatorRule, feeAggregatorItem) - } - var feeTokenRule []interface{} - for _, feeTokenItem := range feeToken { - feeTokenRule = append(feeTokenRule, feeTokenItem) - } - - logs, sub, err := _EVM2EVMMultiOnRamp.contract.WatchLogs(opts, "FeeTokenWithdrawn", feeAggregatorRule, feeTokenRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(EVM2EVMMultiOnRampFeeTokenWithdrawn) - if err := _EVM2EVMMultiOnRamp.contract.UnpackLog(event, "FeeTokenWithdrawn", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRampFilterer) ParseFeeTokenWithdrawn(log types.Log) (*EVM2EVMMultiOnRampFeeTokenWithdrawn, error) { - event := new(EVM2EVMMultiOnRampFeeTokenWithdrawn) - if err := _EVM2EVMMultiOnRamp.contract.UnpackLog(event, "FeeTokenWithdrawn", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type EVM2EVMMultiOnRampOwnershipTransferRequestedIterator struct { - Event *EVM2EVMMultiOnRampOwnershipTransferRequested - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *EVM2EVMMultiOnRampOwnershipTransferRequestedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(EVM2EVMMultiOnRampOwnershipTransferRequested) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(EVM2EVMMultiOnRampOwnershipTransferRequested) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *EVM2EVMMultiOnRampOwnershipTransferRequestedIterator) Error() error { - return it.fail -} - -func (it *EVM2EVMMultiOnRampOwnershipTransferRequestedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type EVM2EVMMultiOnRampOwnershipTransferRequested struct { - From common.Address - To common.Address - Raw types.Log -} - -func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRampFilterer) FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*EVM2EVMMultiOnRampOwnershipTransferRequestedIterator, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _EVM2EVMMultiOnRamp.contract.FilterLogs(opts, "OwnershipTransferRequested", fromRule, toRule) - if err != nil { - return nil, err - } - return &EVM2EVMMultiOnRampOwnershipTransferRequestedIterator{contract: _EVM2EVMMultiOnRamp.contract, event: "OwnershipTransferRequested", logs: logs, sub: sub}, nil -} - -func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRampFilterer) WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *EVM2EVMMultiOnRampOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _EVM2EVMMultiOnRamp.contract.WatchLogs(opts, "OwnershipTransferRequested", fromRule, toRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(EVM2EVMMultiOnRampOwnershipTransferRequested) - if err := _EVM2EVMMultiOnRamp.contract.UnpackLog(event, "OwnershipTransferRequested", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRampFilterer) ParseOwnershipTransferRequested(log types.Log) (*EVM2EVMMultiOnRampOwnershipTransferRequested, error) { - event := new(EVM2EVMMultiOnRampOwnershipTransferRequested) - if err := _EVM2EVMMultiOnRamp.contract.UnpackLog(event, "OwnershipTransferRequested", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type EVM2EVMMultiOnRampOwnershipTransferredIterator struct { - Event *EVM2EVMMultiOnRampOwnershipTransferred - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *EVM2EVMMultiOnRampOwnershipTransferredIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(EVM2EVMMultiOnRampOwnershipTransferred) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(EVM2EVMMultiOnRampOwnershipTransferred) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *EVM2EVMMultiOnRampOwnershipTransferredIterator) Error() error { - return it.fail -} - -func (it *EVM2EVMMultiOnRampOwnershipTransferredIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type EVM2EVMMultiOnRampOwnershipTransferred struct { - From common.Address - To common.Address - Raw types.Log -} - -func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRampFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*EVM2EVMMultiOnRampOwnershipTransferredIterator, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _EVM2EVMMultiOnRamp.contract.FilterLogs(opts, "OwnershipTransferred", fromRule, toRule) - if err != nil { - return nil, err - } - return &EVM2EVMMultiOnRampOwnershipTransferredIterator{contract: _EVM2EVMMultiOnRamp.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil -} - -func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRampFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *EVM2EVMMultiOnRampOwnershipTransferred, from []common.Address, to []common.Address) (event.Subscription, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _EVM2EVMMultiOnRamp.contract.WatchLogs(opts, "OwnershipTransferred", fromRule, toRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(EVM2EVMMultiOnRampOwnershipTransferred) - if err := _EVM2EVMMultiOnRamp.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRampFilterer) ParseOwnershipTransferred(log types.Log) (*EVM2EVMMultiOnRampOwnershipTransferred, error) { - event := new(EVM2EVMMultiOnRampOwnershipTransferred) - if err := _EVM2EVMMultiOnRamp.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type EVM2EVMMultiOnRampPremiumMultiplierWeiPerEthUpdatedIterator struct { - Event *EVM2EVMMultiOnRampPremiumMultiplierWeiPerEthUpdated - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *EVM2EVMMultiOnRampPremiumMultiplierWeiPerEthUpdatedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(EVM2EVMMultiOnRampPremiumMultiplierWeiPerEthUpdated) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(EVM2EVMMultiOnRampPremiumMultiplierWeiPerEthUpdated) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *EVM2EVMMultiOnRampPremiumMultiplierWeiPerEthUpdatedIterator) Error() error { - return it.fail -} - -func (it *EVM2EVMMultiOnRampPremiumMultiplierWeiPerEthUpdatedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type EVM2EVMMultiOnRampPremiumMultiplierWeiPerEthUpdated struct { - Token common.Address - PremiumMultiplierWeiPerEth uint64 - Raw types.Log -} - -func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRampFilterer) FilterPremiumMultiplierWeiPerEthUpdated(opts *bind.FilterOpts, token []common.Address) (*EVM2EVMMultiOnRampPremiumMultiplierWeiPerEthUpdatedIterator, error) { - - var tokenRule []interface{} - for _, tokenItem := range token { - tokenRule = append(tokenRule, tokenItem) - } - - logs, sub, err := _EVM2EVMMultiOnRamp.contract.FilterLogs(opts, "PremiumMultiplierWeiPerEthUpdated", tokenRule) - if err != nil { - return nil, err - } - return &EVM2EVMMultiOnRampPremiumMultiplierWeiPerEthUpdatedIterator{contract: _EVM2EVMMultiOnRamp.contract, event: "PremiumMultiplierWeiPerEthUpdated", logs: logs, sub: sub}, nil -} - -func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRampFilterer) WatchPremiumMultiplierWeiPerEthUpdated(opts *bind.WatchOpts, sink chan<- *EVM2EVMMultiOnRampPremiumMultiplierWeiPerEthUpdated, token []common.Address) (event.Subscription, error) { - - var tokenRule []interface{} - for _, tokenItem := range token { - tokenRule = append(tokenRule, tokenItem) - } - - logs, sub, err := _EVM2EVMMultiOnRamp.contract.WatchLogs(opts, "PremiumMultiplierWeiPerEthUpdated", tokenRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(EVM2EVMMultiOnRampPremiumMultiplierWeiPerEthUpdated) - if err := _EVM2EVMMultiOnRamp.contract.UnpackLog(event, "PremiumMultiplierWeiPerEthUpdated", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRampFilterer) ParsePremiumMultiplierWeiPerEthUpdated(log types.Log) (*EVM2EVMMultiOnRampPremiumMultiplierWeiPerEthUpdated, error) { - event := new(EVM2EVMMultiOnRampPremiumMultiplierWeiPerEthUpdated) - if err := _EVM2EVMMultiOnRamp.contract.UnpackLog(event, "PremiumMultiplierWeiPerEthUpdated", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type EVM2EVMMultiOnRampTokenTransferFeeConfigDeletedIterator struct { - Event *EVM2EVMMultiOnRampTokenTransferFeeConfigDeleted - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *EVM2EVMMultiOnRampTokenTransferFeeConfigDeletedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(EVM2EVMMultiOnRampTokenTransferFeeConfigDeleted) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(EVM2EVMMultiOnRampTokenTransferFeeConfigDeleted) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *EVM2EVMMultiOnRampTokenTransferFeeConfigDeletedIterator) Error() error { - return it.fail -} - -func (it *EVM2EVMMultiOnRampTokenTransferFeeConfigDeletedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type EVM2EVMMultiOnRampTokenTransferFeeConfigDeleted struct { - DestChainSelector uint64 - Token common.Address - Raw types.Log -} - -func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRampFilterer) FilterTokenTransferFeeConfigDeleted(opts *bind.FilterOpts, destChainSelector []uint64, token []common.Address) (*EVM2EVMMultiOnRampTokenTransferFeeConfigDeletedIterator, error) { - - var destChainSelectorRule []interface{} - for _, destChainSelectorItem := range destChainSelector { - destChainSelectorRule = append(destChainSelectorRule, destChainSelectorItem) - } - var tokenRule []interface{} - for _, tokenItem := range token { - tokenRule = append(tokenRule, tokenItem) - } - - logs, sub, err := _EVM2EVMMultiOnRamp.contract.FilterLogs(opts, "TokenTransferFeeConfigDeleted", destChainSelectorRule, tokenRule) - if err != nil { - return nil, err - } - return &EVM2EVMMultiOnRampTokenTransferFeeConfigDeletedIterator{contract: _EVM2EVMMultiOnRamp.contract, event: "TokenTransferFeeConfigDeleted", logs: logs, sub: sub}, nil -} - -func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRampFilterer) WatchTokenTransferFeeConfigDeleted(opts *bind.WatchOpts, sink chan<- *EVM2EVMMultiOnRampTokenTransferFeeConfigDeleted, destChainSelector []uint64, token []common.Address) (event.Subscription, error) { - - var destChainSelectorRule []interface{} - for _, destChainSelectorItem := range destChainSelector { - destChainSelectorRule = append(destChainSelectorRule, destChainSelectorItem) - } - var tokenRule []interface{} - for _, tokenItem := range token { - tokenRule = append(tokenRule, tokenItem) - } - - logs, sub, err := _EVM2EVMMultiOnRamp.contract.WatchLogs(opts, "TokenTransferFeeConfigDeleted", destChainSelectorRule, tokenRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(EVM2EVMMultiOnRampTokenTransferFeeConfigDeleted) - if err := _EVM2EVMMultiOnRamp.contract.UnpackLog(event, "TokenTransferFeeConfigDeleted", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRampFilterer) ParseTokenTransferFeeConfigDeleted(log types.Log) (*EVM2EVMMultiOnRampTokenTransferFeeConfigDeleted, error) { - event := new(EVM2EVMMultiOnRampTokenTransferFeeConfigDeleted) - if err := _EVM2EVMMultiOnRamp.contract.UnpackLog(event, "TokenTransferFeeConfigDeleted", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type EVM2EVMMultiOnRampTokenTransferFeeConfigUpdatedIterator struct { - Event *EVM2EVMMultiOnRampTokenTransferFeeConfigUpdated - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *EVM2EVMMultiOnRampTokenTransferFeeConfigUpdatedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(EVM2EVMMultiOnRampTokenTransferFeeConfigUpdated) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(EVM2EVMMultiOnRampTokenTransferFeeConfigUpdated) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *EVM2EVMMultiOnRampTokenTransferFeeConfigUpdatedIterator) Error() error { - return it.fail -} - -func (it *EVM2EVMMultiOnRampTokenTransferFeeConfigUpdatedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type EVM2EVMMultiOnRampTokenTransferFeeConfigUpdated struct { - DestChainSelector uint64 - Token common.Address - TokenTransferFeeConfig EVM2EVMMultiOnRampTokenTransferFeeConfig - Raw types.Log -} - -func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRampFilterer) FilterTokenTransferFeeConfigUpdated(opts *bind.FilterOpts, destChainSelector []uint64, token []common.Address) (*EVM2EVMMultiOnRampTokenTransferFeeConfigUpdatedIterator, error) { - - var destChainSelectorRule []interface{} - for _, destChainSelectorItem := range destChainSelector { - destChainSelectorRule = append(destChainSelectorRule, destChainSelectorItem) - } - var tokenRule []interface{} - for _, tokenItem := range token { - tokenRule = append(tokenRule, tokenItem) - } - - logs, sub, err := _EVM2EVMMultiOnRamp.contract.FilterLogs(opts, "TokenTransferFeeConfigUpdated", destChainSelectorRule, tokenRule) + logs, sub, err := _EVM2EVMMultiOnRamp.contract.FilterLogs(opts, "OwnershipTransferred", fromRule, toRule) if err != nil { return nil, err } - return &EVM2EVMMultiOnRampTokenTransferFeeConfigUpdatedIterator{contract: _EVM2EVMMultiOnRamp.contract, event: "TokenTransferFeeConfigUpdated", logs: logs, sub: sub}, nil + return &EVM2EVMMultiOnRampOwnershipTransferredIterator{contract: _EVM2EVMMultiOnRamp.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil } -func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRampFilterer) WatchTokenTransferFeeConfigUpdated(opts *bind.WatchOpts, sink chan<- *EVM2EVMMultiOnRampTokenTransferFeeConfigUpdated, destChainSelector []uint64, token []common.Address) (event.Subscription, error) { +func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRampFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *EVM2EVMMultiOnRampOwnershipTransferred, from []common.Address, to []common.Address) (event.Subscription, error) { - var destChainSelectorRule []interface{} - for _, destChainSelectorItem := range destChainSelector { - destChainSelectorRule = append(destChainSelectorRule, destChainSelectorItem) + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) } - var tokenRule []interface{} - for _, tokenItem := range token { - tokenRule = append(tokenRule, tokenItem) + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) } - logs, sub, err := _EVM2EVMMultiOnRamp.contract.WatchLogs(opts, "TokenTransferFeeConfigUpdated", destChainSelectorRule, tokenRule) + logs, sub, err := _EVM2EVMMultiOnRamp.contract.WatchLogs(opts, "OwnershipTransferred", fromRule, toRule) if err != nil { return nil, err } @@ -2150,8 +1329,8 @@ func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRampFilterer) WatchTokenTransferFeeConf select { case log := <-logs: - event := new(EVM2EVMMultiOnRampTokenTransferFeeConfigUpdated) - if err := _EVM2EVMMultiOnRamp.contract.UnpackLog(event, "TokenTransferFeeConfigUpdated", log); err != nil { + event := new(EVM2EVMMultiOnRampOwnershipTransferred) + if err := _EVM2EVMMultiOnRamp.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { return err } event.Raw = log @@ -2172,9 +1351,9 @@ func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRampFilterer) WatchTokenTransferFeeConf }), nil } -func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRampFilterer) ParseTokenTransferFeeConfigUpdated(log types.Log) (*EVM2EVMMultiOnRampTokenTransferFeeConfigUpdated, error) { - event := new(EVM2EVMMultiOnRampTokenTransferFeeConfigUpdated) - if err := _EVM2EVMMultiOnRamp.contract.UnpackLog(event, "TokenTransferFeeConfigUpdated", log); err != nil { +func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRampFilterer) ParseOwnershipTransferred(log types.Log) (*EVM2EVMMultiOnRampOwnershipTransferred, error) { + event := new(EVM2EVMMultiOnRampOwnershipTransferred) + if err := _EVM2EVMMultiOnRamp.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { return nil, err } event.Raw = log @@ -2189,10 +1368,6 @@ func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRamp) ParseLog(log types.Log) (generate return _EVM2EVMMultiOnRamp.ParseCCIPSendRequested(log) case _EVM2EVMMultiOnRamp.abi.Events["ConfigSet"].ID: return _EVM2EVMMultiOnRamp.ParseConfigSet(log) - case _EVM2EVMMultiOnRamp.abi.Events["DestChainAdded"].ID: - return _EVM2EVMMultiOnRamp.ParseDestChainAdded(log) - case _EVM2EVMMultiOnRamp.abi.Events["DestChainDynamicConfigUpdated"].ID: - return _EVM2EVMMultiOnRamp.ParseDestChainDynamicConfigUpdated(log) case _EVM2EVMMultiOnRamp.abi.Events["FeePaid"].ID: return _EVM2EVMMultiOnRamp.ParseFeePaid(log) case _EVM2EVMMultiOnRamp.abi.Events["FeeTokenWithdrawn"].ID: @@ -2201,12 +1376,6 @@ func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRamp) ParseLog(log types.Log) (generate return _EVM2EVMMultiOnRamp.ParseOwnershipTransferRequested(log) case _EVM2EVMMultiOnRamp.abi.Events["OwnershipTransferred"].ID: return _EVM2EVMMultiOnRamp.ParseOwnershipTransferred(log) - case _EVM2EVMMultiOnRamp.abi.Events["PremiumMultiplierWeiPerEthUpdated"].ID: - return _EVM2EVMMultiOnRamp.ParsePremiumMultiplierWeiPerEthUpdated(log) - case _EVM2EVMMultiOnRamp.abi.Events["TokenTransferFeeConfigDeleted"].ID: - return _EVM2EVMMultiOnRamp.ParseTokenTransferFeeConfigDeleted(log) - case _EVM2EVMMultiOnRamp.abi.Events["TokenTransferFeeConfigUpdated"].ID: - return _EVM2EVMMultiOnRamp.ParseTokenTransferFeeConfigUpdated(log) default: return nil, fmt.Errorf("abigen wrapper received unknown log topic: %v", log.Topics[0]) @@ -2222,15 +1391,7 @@ func (EVM2EVMMultiOnRampCCIPSendRequested) Topic() common.Hash { } func (EVM2EVMMultiOnRampConfigSet) Topic() common.Hash { - return common.HexToHash("0x4012fe74115805c44a121d8f9edc3d234df8f05f53b52864b8e5e8a30384b8aa") -} - -func (EVM2EVMMultiOnRampDestChainAdded) Topic() common.Hash { - return common.HexToHash("0x26f8c55bd3f591fd6042c98ad4d707257cd565dc47609bfa3ba517400d057044") -} - -func (EVM2EVMMultiOnRampDestChainDynamicConfigUpdated) Topic() common.Hash { - return common.HexToHash("0xd42d3a670a4f1ab5d8703efa22bb17041446365cfcfa33980ced685a080cf7cb") + return common.HexToHash("0x23a1adf8ad7fad6091a4803227af2cee848c01a7c812404cade7c25636925e32") } func (EVM2EVMMultiOnRampFeePaid) Topic() common.Hash { @@ -2249,25 +1410,11 @@ func (EVM2EVMMultiOnRampOwnershipTransferred) Topic() common.Hash { return common.HexToHash("0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0") } -func (EVM2EVMMultiOnRampPremiumMultiplierWeiPerEthUpdated) Topic() common.Hash { - return common.HexToHash("0xbb77da6f7210cdd16904228a9360133d1d7dfff99b1bc75f128da5b53e28f97d") -} - -func (EVM2EVMMultiOnRampTokenTransferFeeConfigDeleted) Topic() common.Hash { - return common.HexToHash("0x4de5b1bcbca6018c11303a2c3f4a4b4f22a1c741d8c4ba430d246ac06c5ddf8b") -} - -func (EVM2EVMMultiOnRampTokenTransferFeeConfigUpdated) Topic() common.Hash { - return common.HexToHash("0x94967ae9ea7729ad4f54021c1981765d2b1d954f7c92fbec340aa0a54f46b8b5") -} - func (_EVM2EVMMultiOnRamp *EVM2EVMMultiOnRamp) Address() common.Address { return _EVM2EVMMultiOnRamp.address } type EVM2EVMMultiOnRampInterface interface { - GetDestChainConfig(opts *bind.CallOpts, destChainSelector uint64) (EVM2EVMMultiOnRampDestChainConfig, error) - GetDynamicConfig(opts *bind.CallOpts) (EVM2EVMMultiOnRampDynamicConfig, error) GetExpectedNextSequenceNumber(opts *bind.CallOpts, destChainSelector uint64) (uint64, error) @@ -2276,26 +1423,16 @@ type EVM2EVMMultiOnRampInterface interface { GetPoolBySourceToken(opts *bind.CallOpts, arg0 uint64, sourceToken common.Address) (common.Address, error) - GetPremiumMultiplierWeiPerEth(opts *bind.CallOpts, token common.Address) (uint64, error) - GetStaticConfig(opts *bind.CallOpts) (EVM2EVMMultiOnRampStaticConfig, error) GetSupportedTokens(opts *bind.CallOpts, arg0 uint64) ([]common.Address, error) - GetTokenTransferFeeConfig(opts *bind.CallOpts, destChainSelector uint64, token common.Address) (EVM2EVMMultiOnRampTokenTransferFeeConfig, error) - Owner(opts *bind.CallOpts) (common.Address, error) TypeAndVersion(opts *bind.CallOpts) (string, error) AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) - ApplyDestChainConfigUpdates(opts *bind.TransactOpts, destChainConfigArgs []EVM2EVMMultiOnRampDestChainConfigArgs) (*types.Transaction, error) - - ApplyPremiumMultiplierWeiPerEthUpdates(opts *bind.TransactOpts, premiumMultiplierWeiPerEthArgs []EVM2EVMMultiOnRampPremiumMultiplierWeiPerEthArgs) (*types.Transaction, error) - - ApplyTokenTransferFeeConfigUpdates(opts *bind.TransactOpts, tokenTransferFeeConfigArgs []EVM2EVMMultiOnRampTokenTransferFeeConfigArgs, tokensToUseDefaultFeeConfigs []EVM2EVMMultiOnRampTokenTransferFeeConfigRemoveArgs) (*types.Transaction, error) - ForwardFromRouter(opts *bind.TransactOpts, destChainSelector uint64, message ClientEVM2AnyMessage, feeTokenAmount *big.Int, originalSender common.Address) (*types.Transaction, error) SetDynamicConfig(opts *bind.TransactOpts, dynamicConfig EVM2EVMMultiOnRampDynamicConfig) (*types.Transaction, error) @@ -2322,18 +1459,6 @@ type EVM2EVMMultiOnRampInterface interface { ParseConfigSet(log types.Log) (*EVM2EVMMultiOnRampConfigSet, error) - FilterDestChainAdded(opts *bind.FilterOpts, destChainSelector []uint64) (*EVM2EVMMultiOnRampDestChainAddedIterator, error) - - WatchDestChainAdded(opts *bind.WatchOpts, sink chan<- *EVM2EVMMultiOnRampDestChainAdded, destChainSelector []uint64) (event.Subscription, error) - - ParseDestChainAdded(log types.Log) (*EVM2EVMMultiOnRampDestChainAdded, error) - - FilterDestChainDynamicConfigUpdated(opts *bind.FilterOpts, destChainSelector []uint64) (*EVM2EVMMultiOnRampDestChainDynamicConfigUpdatedIterator, error) - - WatchDestChainDynamicConfigUpdated(opts *bind.WatchOpts, sink chan<- *EVM2EVMMultiOnRampDestChainDynamicConfigUpdated, destChainSelector []uint64) (event.Subscription, error) - - ParseDestChainDynamicConfigUpdated(log types.Log) (*EVM2EVMMultiOnRampDestChainDynamicConfigUpdated, error) - FilterFeePaid(opts *bind.FilterOpts, feeToken []common.Address) (*EVM2EVMMultiOnRampFeePaidIterator, error) WatchFeePaid(opts *bind.WatchOpts, sink chan<- *EVM2EVMMultiOnRampFeePaid, feeToken []common.Address) (event.Subscription, error) @@ -2358,24 +1483,6 @@ type EVM2EVMMultiOnRampInterface interface { ParseOwnershipTransferred(log types.Log) (*EVM2EVMMultiOnRampOwnershipTransferred, error) - FilterPremiumMultiplierWeiPerEthUpdated(opts *bind.FilterOpts, token []common.Address) (*EVM2EVMMultiOnRampPremiumMultiplierWeiPerEthUpdatedIterator, error) - - WatchPremiumMultiplierWeiPerEthUpdated(opts *bind.WatchOpts, sink chan<- *EVM2EVMMultiOnRampPremiumMultiplierWeiPerEthUpdated, token []common.Address) (event.Subscription, error) - - ParsePremiumMultiplierWeiPerEthUpdated(log types.Log) (*EVM2EVMMultiOnRampPremiumMultiplierWeiPerEthUpdated, error) - - FilterTokenTransferFeeConfigDeleted(opts *bind.FilterOpts, destChainSelector []uint64, token []common.Address) (*EVM2EVMMultiOnRampTokenTransferFeeConfigDeletedIterator, error) - - WatchTokenTransferFeeConfigDeleted(opts *bind.WatchOpts, sink chan<- *EVM2EVMMultiOnRampTokenTransferFeeConfigDeleted, destChainSelector []uint64, token []common.Address) (event.Subscription, error) - - ParseTokenTransferFeeConfigDeleted(log types.Log) (*EVM2EVMMultiOnRampTokenTransferFeeConfigDeleted, error) - - FilterTokenTransferFeeConfigUpdated(opts *bind.FilterOpts, destChainSelector []uint64, token []common.Address) (*EVM2EVMMultiOnRampTokenTransferFeeConfigUpdatedIterator, error) - - WatchTokenTransferFeeConfigUpdated(opts *bind.WatchOpts, sink chan<- *EVM2EVMMultiOnRampTokenTransferFeeConfigUpdated, destChainSelector []uint64, token []common.Address) (event.Subscription, error) - - ParseTokenTransferFeeConfigUpdated(log types.Log) (*EVM2EVMMultiOnRampTokenTransferFeeConfigUpdated, error) - ParseLog(log types.Log) (generated.AbigenLog, error) Address() common.Address diff --git a/core/gethwrappers/ccip/generated/price_registry/price_registry.go b/core/gethwrappers/ccip/generated/price_registry/price_registry.go index 5b18229872..e583b5b544 100644 --- a/core/gethwrappers/ccip/generated/price_registry/price_registry.go +++ b/core/gethwrappers/ccip/generated/price_registry/price_registry.go @@ -35,11 +35,35 @@ type AuthorizedCallersAuthorizedCallerArgs struct { RemovedCallers []common.Address } +type ClientEVM2AnyMessage struct { + Receiver []byte + Data []byte + TokenAmounts []ClientEVMTokenAmount + FeeToken common.Address + ExtraArgs []byte +} + +type ClientEVMTokenAmount struct { + Token common.Address + Amount *big.Int +} + type IPriceRegistryTokenPriceFeedConfig struct { DataFeedAddress common.Address TokenDecimals uint8 } +type InternalEVM2AnyRampMessage struct { + Header InternalRampMessageHeader + Sender common.Address + Data []byte + Receiver []byte + ExtraArgs []byte + FeeToken common.Address + FeeTokenAmount *big.Int + TokenAmounts []InternalRampTokenAmount +} + type InternalGasPriceUpdate struct { DestChainSelector uint64 UsdPerUnitGas *big.Int @@ -50,6 +74,21 @@ type InternalPriceUpdates struct { GasPriceUpdates []InternalGasPriceUpdate } +type InternalRampMessageHeader struct { + MessageId [32]byte + SourceChainSelector uint64 + DestChainSelector uint64 + SequenceNumber uint64 + Nonce uint64 +} + +type InternalRampTokenAmount struct { + SourcePoolAddress []byte + DestTokenAddress []byte + ExtraData []byte + Amount *big.Int +} + type InternalTimestampedPackedUint224 struct { Value *big.Int Timestamp uint32 @@ -60,21 +99,80 @@ type InternalTokenPriceUpdate struct { UsdPerToken *big.Int } +type PriceRegistryDestChainDynamicConfig struct { + IsEnabled bool + MaxNumberOfTokensPerMsg uint16 + MaxDataBytes uint32 + MaxPerMsgGasLimit uint32 + DestGasOverhead uint32 + DestGasPerPayloadByte uint16 + DestDataAvailabilityOverheadGas uint32 + DestGasPerDataAvailabilityByte uint16 + DestDataAvailabilityMultiplierBps uint16 + DefaultTokenFeeUSDCents uint16 + DefaultTokenDestGasOverhead uint32 + DefaultTokenDestBytesOverhead uint32 + DefaultTxGasLimit uint64 + GasMultiplierWeiPerEth uint64 + NetworkFeeUSDCents uint32 + EnforceOutOfOrder bool + ChainFamilySelector [4]byte +} + +type PriceRegistryDestChainDynamicConfigArgs struct { + DestChainSelector uint64 + DynamicConfig PriceRegistryDestChainDynamicConfig +} + +type PriceRegistryPremiumMultiplierWeiPerEthArgs struct { + Token common.Address + PremiumMultiplierWeiPerEth uint64 +} + +type PriceRegistryStaticConfig struct { + MaxFeeJuelsPerMsg *big.Int + LinkToken common.Address +} + type PriceRegistryTokenPriceFeedUpdate struct { SourceToken common.Address FeedConfig IPriceRegistryTokenPriceFeedConfig } +type PriceRegistryTokenTransferFeeConfig struct { + MinFeeUSDCents uint32 + MaxFeeUSDCents uint32 + DeciBps uint16 + DestGasOverhead uint32 + DestBytesOverhead uint32 + IsEnabled bool +} + +type PriceRegistryTokenTransferFeeConfigArgs struct { + DestChainSelector uint64 + TokenTransferFeeConfigs []PriceRegistryTokenTransferFeeConfigSingleTokenArgs +} + +type PriceRegistryTokenTransferFeeConfigRemoveArgs struct { + DestChainSelector uint64 + Token common.Address +} + +type PriceRegistryTokenTransferFeeConfigSingleTokenArgs struct { + Token common.Address + TokenTransferFeeConfig PriceRegistryTokenTransferFeeConfig +} + var PriceRegistryMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"priceUpdaters\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"feeTokens\",\"type\":\"address[]\"},{\"internalType\":\"uint32\",\"name\":\"stalenessThreshold\",\"type\":\"uint32\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"sourceToken\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"dataFeedAddress\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"tokenDecimals\",\"type\":\"uint8\"}],\"internalType\":\"structIPriceRegistry.TokenPriceFeedConfig\",\"name\":\"feedConfig\",\"type\":\"tuple\"}],\"internalType\":\"structPriceRegistry.TokenPriceFeedUpdate[]\",\"name\":\"tokenPriceFeeds\",\"type\":\"tuple[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chain\",\"type\":\"uint64\"}],\"name\":\"ChainNotSupported\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DataFeedValueOutOfUint224Range\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidStalenessThreshold\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"uint256\",\"name\":\"threshold\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timePassed\",\"type\":\"uint256\"}],\"name\":\"StaleGasPrice\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"TokenNotSupported\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"}],\"name\":\"UnauthorizedCaller\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddressNotAllowed\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"}],\"name\":\"AuthorizedCallerAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"}],\"name\":\"AuthorizedCallerRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"feeToken\",\"type\":\"address\"}],\"name\":\"FeeTokenAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"feeToken\",\"type\":\"address\"}],\"name\":\"FeeTokenRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"dataFeedAddress\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"tokenDecimals\",\"type\":\"uint8\"}],\"indexed\":false,\"internalType\":\"structIPriceRegistry.TokenPriceFeedConfig\",\"name\":\"priceFeedConfig\",\"type\":\"tuple\"}],\"name\":\"PriceFeedPerTokenUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"priceUpdater\",\"type\":\"address\"}],\"name\":\"PriceUpdaterRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"priceUpdater\",\"type\":\"address\"}],\"name\":\"PriceUpdaterSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"UsdPerTokenUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"destChain\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"UsdPerUnitGasUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address[]\",\"name\":\"addedCallers\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"removedCallers\",\"type\":\"address[]\"}],\"internalType\":\"structAuthorizedCallers.AuthorizedCallerArgs\",\"name\":\"authorizedCallerArgs\",\"type\":\"tuple\"}],\"name\":\"applyAuthorizedCallerUpdates\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"feeTokensToAdd\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"feeTokensToRemove\",\"type\":\"address[]\"}],\"name\":\"applyFeeTokensUpdates\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"fromToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"fromTokenAmount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"toToken\",\"type\":\"address\"}],\"name\":\"convertTokenAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllAuthorizedCallers\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"}],\"name\":\"getDestinationChainGasPrice\",\"outputs\":[{\"components\":[{\"internalType\":\"uint224\",\"name\":\"value\",\"type\":\"uint224\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"}],\"internalType\":\"structInternal.TimestampedPackedUint224\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getFeeTokens\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getStalenessThreshold\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"}],\"name\":\"getTokenAndGasPrices\",\"outputs\":[{\"internalType\":\"uint224\",\"name\":\"tokenPrice\",\"type\":\"uint224\"},{\"internalType\":\"uint224\",\"name\":\"gasPriceValue\",\"type\":\"uint224\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"getTokenPrice\",\"outputs\":[{\"components\":[{\"internalType\":\"uint224\",\"name\":\"value\",\"type\":\"uint224\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"}],\"internalType\":\"structInternal.TimestampedPackedUint224\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"getTokenPriceFeedConfig\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"dataFeedAddress\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"tokenDecimals\",\"type\":\"uint8\"}],\"internalType\":\"structIPriceRegistry.TokenPriceFeedConfig\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"}],\"name\":\"getTokenPrices\",\"outputs\":[{\"components\":[{\"internalType\":\"uint224\",\"name\":\"value\",\"type\":\"uint224\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"}],\"internalType\":\"structInternal.TimestampedPackedUint224[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"getValidatedTokenPrice\",\"outputs\":[{\"internalType\":\"uint224\",\"name\":\"\",\"type\":\"uint224\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"typeAndVersion\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"sourceToken\",\"type\":\"address\"},{\"internalType\":\"uint224\",\"name\":\"usdPerToken\",\"type\":\"uint224\"}],\"internalType\":\"structInternal.TokenPriceUpdate[]\",\"name\":\"tokenPriceUpdates\",\"type\":\"tuple[]\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"uint224\",\"name\":\"usdPerUnitGas\",\"type\":\"uint224\"}],\"internalType\":\"structInternal.GasPriceUpdate[]\",\"name\":\"gasPriceUpdates\",\"type\":\"tuple[]\"}],\"internalType\":\"structInternal.PriceUpdates\",\"name\":\"priceUpdates\",\"type\":\"tuple\"}],\"name\":\"updatePrices\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"sourceToken\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"dataFeedAddress\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"tokenDecimals\",\"type\":\"uint8\"}],\"internalType\":\"structIPriceRegistry.TokenPriceFeedConfig\",\"name\":\"feedConfig\",\"type\":\"tuple\"}],\"internalType\":\"structPriceRegistry.TokenPriceFeedUpdate[]\",\"name\":\"tokenPriceFeedUpdates\",\"type\":\"tuple[]\"}],\"name\":\"updateTokenPriceFeeds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x60a06040523480156200001157600080fd5b5060405162002b9938038062002b99833981016040819052620000349162000828565b8333806000816200008c5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000bf57620000bf8162000151565b5050604080518082018252838152815160008152602080820190935291810191909152620000ee9150620001fc565b506040805160008152602081019091526200010b9084906200034b565b620001168162000493565b8163ffffffff166000036200013e57604051631151410960e11b815260040160405180910390fd5b5063ffffffff1660805250620009f79050565b336001600160a01b03821603620001ab5760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000083565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b602081015160005b81518110156200028c576000828281518110620002255762000225620009a9565b602090810291909101015190506200023f60028262000564565b1562000282576040516001600160a01b03821681527fc3803387881faad271c47728894e3e36fac830ffc8602ca6fc07733cbda775809060200160405180910390a15b5060010162000204565b50815160005b815181101562000345576000828281518110620002b357620002b3620009a9565b6020026020010151905060006001600160a01b0316816001600160a01b031603620002f1576040516342bcdf7f60e11b815260040160405180910390fd5b620002fe60028262000584565b506040516001600160a01b03821681527feb1b9b92e50b7f88f9ff25d56765095ac6e91540eee214906f4036a908ffbdef9060200160405180910390a15060010162000292565b50505050565b60005b8251811015620003ec576200038a838281518110620003715762000371620009a9565b602002602001015160096200058460201b90919060201c565b15620003e357828181518110620003a557620003a5620009a9565b60200260200101516001600160a01b03167fdf1b1bd32a69711488d71554706bb130b1fc63a5fa1a2cd85e8440f84065ba2360405160405180910390a25b6001016200034e565b5060005b81518110156200048e576200042c828281518110620004135762000413620009a9565b602002602001015160096200056460201b90919060201c565b156200048557818181518110620004475762000447620009a9565b60200260200101516001600160a01b03167f1795838dc8ab2ffc5f431a1729a6afa0b587f982f7b2be0b9d7187a1ef547f9160405160405180910390a25b600101620003f0565b505050565b60005b815181101562000560576000828281518110620004b757620004b7620009a9565b6020908102919091018101518051818301516001600160a01b0380831660008181526006875260409081902084518154868a018051929096166001600160a81b03199091168117600160a01b60ff9384160217909255825191825293519093169683019690965293955091939092917f08a5f7f5bb38a81d8e43aca13ecd76431dbf8816ae4699affff7b00b2fc1c464910160405180910390a250505080600101905062000496565b5050565b60006200057b836001600160a01b0384166200059b565b90505b92915050565b60006200057b836001600160a01b0384166200069f565b6000818152600183016020526040812054801562000694576000620005c2600183620009bf565b8554909150600090620005d890600190620009bf565b905081811462000644576000866000018281548110620005fc57620005fc620009a9565b9060005260206000200154905080876000018481548110620006225762000622620009a9565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080620006585762000658620009e1565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506200057e565b60009150506200057e565b6000818152600183016020526040812054620006e8575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556200057e565b5060006200057e565b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b03811182821017156200072c576200072c620006f1565b60405290565b604051601f8201601f191681016001600160401b03811182821017156200075d576200075d620006f1565b604052919050565b60006001600160401b03821115620007815762000781620006f1565b5060051b60200190565b80516001600160a01b0381168114620007a357600080fd5b919050565b600082601f830112620007ba57600080fd5b81516020620007d3620007cd8362000765565b62000732565b8083825260208201915060208460051b870101935086841115620007f657600080fd5b602086015b848110156200081d576200080f816200078b565b8352918301918301620007fb565b509695505050505050565b600080600080608085870312156200083f57600080fd5b84516001600160401b03808211156200085757600080fd5b6200086588838901620007a8565b95506020915081870151818111156200087d57600080fd5b6200088b89828a01620007a8565b95505060408088015163ffffffff81168114620008a757600080fd5b8095505060608089015183811115620008bf57600080fd5b89019250601f83018a13620008d357600080fd5b8251620008e4620007cd8262000765565b81815260609091028401850190858101908c8311156200090357600080fd5b948601945b828610156200099857858d0384811215620009235760008081fd5b6200092d62000707565b62000938886200078b565b815286601f19830112156200094d5760008081fd5b6200095762000707565b9150620009668989016200078b565b82528688015160ff811681146200097d5760008081fd5b828a0152808901919091528252948301949086019062000908565b999c989b5096995050505050505050565b634e487b7160e01b600052603260045260246000fd5b818103818111156200057e57634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603160045260246000fd5b60805161217862000a216000396000818161034901528181610bee0152610c5701526121786000f3fe608060405234801561001057600080fd5b50600436106101355760003560e01c80637afac322116100b2578063bf78e03f11610081578063d02641a011610066578063d02641a014610428578063f2fde38b1461043b578063ffdb4b371461044e57600080fd5b8063bf78e03f14610373578063cdc73d511461042057600080fd5b80637afac322146102f15780638da5cb5b1461030457806391a2749a1461032c578063a6c94a731461033f57600080fd5b8063407e1086116101095780634ab35b0b116100ee5780634ab35b0b14610206578063514e8cff1461024657806379ba5097146102e957600080fd5b8063407e1086146101d357806345ac924d146101e657600080fd5b806241e5be1461013a578063181f5a77146101605780632451a627146101a95780633937306f146101be575b600080fd5b61014d61014836600461175a565b610496565b6040519081526020015b60405180910390f35b61019c6040518060400160405280601781526020017f5072696365526567697374727920312e362e302d64657600000000000000000081525081565b6040516101579190611796565b6101b1610502565b6040516101579190611803565b6101d16101cc36600461185d565b610513565b005b6101d16101e1366004611972565b6107e7565b6101f96101f4366004611a8b565b6107fb565b6040516101579190611b00565b610219610214366004611b7b565b6108c6565b6040517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff9091168152602001610157565b6102dc610254366004611bae565b60408051808201909152600080825260208201525067ffffffffffffffff166000908152600460209081526040918290208251808401909352547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff811683527c0100000000000000000000000000000000000000000000000000000000900463ffffffff169082015290565b6040516101579190611bc9565b6101d16108d1565b6101d16102ff366004611c75565b6109d3565b60005460405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610157565b6101d161033a366004611cd9565b6109e9565b60405163ffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152602001610157565b6103ec610381366004611b7b565b6040805180820182526000808252602091820181905273ffffffffffffffffffffffffffffffffffffffff93841681526006825282902082518084019093525492831682527401000000000000000000000000000000000000000090920460ff169181019190915290565b60408051825173ffffffffffffffffffffffffffffffffffffffff16815260209283015160ff169281019290925201610157565b6101b16109fa565b6102dc610436366004611b7b565b610a06565b6101d1610449366004611b7b565b610b09565b61046161045c366004611d6a565b610b1a565b604080517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff938416815292909116602083015201610157565b60006104a182610ca5565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166104c885610ca5565b6104f0907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1685611dcc565b6104fa9190611de3565b949350505050565b606061050e6002610d3f565b905090565b60005473ffffffffffffffffffffffffffffffffffffffff16331461053a5761053a610d4c565b60006105468280611e1e565b9050905060005b818110156106905760006105618480611e1e565b8381811061057157610571611e86565b9050604002018036038101906105879190611ee1565b604080518082018252602080840180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff908116845263ffffffff42818116858701908152885173ffffffffffffffffffffffffffffffffffffffff9081166000908152600590975295889020965190519092167c010000000000000000000000000000000000000000000000000000000002919092161790935584519051935194955016927f52f50aa6d1a95a4595361ecf953d095f125d442e4673716dede699e049de148a9261067f9290917bffffffffffffffffffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b60405180910390a25060010161054d565b5060006106a06020840184611e1e565b9050905060005b818110156107e15760006106be6020860186611e1e565b838181106106ce576106ce611e86565b9050604002018036038101906106e49190611f1e565b604080518082018252602080840180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff908116845263ffffffff42818116858701908152885167ffffffffffffffff9081166000908152600490975295889020965190519092167c010000000000000000000000000000000000000000000000000000000002919092161790935584519051935194955016927fdd84a3fa9ef9409f550d54d6affec7e9c480c878c6ab27b78912a03e1b371c6e926107d09290917bffffffffffffffffffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b60405180910390a2506001016106a7565b50505050565b6107ef610d91565b6107f881610e12565b50565b60608160008167ffffffffffffffff81111561081957610819611898565b60405190808252806020026020018201604052801561085e57816020015b60408051808201909152600080825260208201528152602001906001900390816108375790505b50905060005b828110156108bb5761089686868381811061088157610881611e86565b90506020020160208101906104369190611b7b565b8282815181106108a8576108a8611e86565b6020908102919091010152600101610864565b509150505b92915050565b60006108c082610ca5565b60015473ffffffffffffffffffffffffffffffffffffffff163314610957576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064015b60405180910390fd5b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b6109db610d91565b6109e58282610f10565b5050565b6109f1610d91565b6107f88161105c565b606061050e6009610d3f565b604080518082019091526000808252602082015273ffffffffffffffffffffffffffffffffffffffff8281166000908152600660209081526040918290208251808401909352549283168083527401000000000000000000000000000000000000000090930460ff169082015290610af957505073ffffffffffffffffffffffffffffffffffffffff166000908152600560209081526040918290208251808401909352547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff811683527c0100000000000000000000000000000000000000000000000000000000900463ffffffff169082015290565b610b02816111e8565b9392505050565b610b11610d91565b6107f88161142b565b67ffffffffffffffff811660009081526004602090815260408083208151808301909252547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff811682527c0100000000000000000000000000000000000000000000000000000000900463ffffffff1691810182905282918203610bd2576040517f2e59db3a00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff8516600482015260240161094e565b6000816020015163ffffffff1642610bea9190611f41565b90507f000000000000000000000000000000000000000000000000000000000000000063ffffffff16811115610c8b576040517ff08bcb3e00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff8616600482015263ffffffff7f00000000000000000000000000000000000000000000000000000000000000001660248201526044810182905260640161094e565b610c9486610ca5565b9151919350909150505b9250929050565b600080610cb183610a06565b9050806020015163ffffffff1660001480610ce9575080517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16155b15610d38576040517f06439c6b00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8416600482015260240161094e565b5192915050565b60606000610b0283611520565b610d5760023361157c565b610d8f576040517fd86ad9cf00000000000000000000000000000000000000000000000000000000815233600482015260240161094e565b565b60005473ffffffffffffffffffffffffffffffffffffffff163314610d8f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000604482015260640161094e565b60005b81518110156109e5576000828281518110610e3257610e32611e86565b60209081029190910181015180518183015173ffffffffffffffffffffffffffffffffffffffff80831660008181526006875260409081902084518154868a018051929096167fffffffffffffffffffffff00000000000000000000000000000000000000000090911681177401000000000000000000000000000000000000000060ff9384160217909255825191825293519093169683019690965293955091939092917f08a5f7f5bb38a81d8e43aca13ecd76431dbf8816ae4699affff7b00b2fc1c464910160405180910390a2505050806001019050610e15565b60005b8251811015610fb357610f49838281518110610f3157610f31611e86565b602002602001015160096115ab90919063ffffffff16565b15610fab57828181518110610f6057610f60611e86565b602002602001015173ffffffffffffffffffffffffffffffffffffffff167fdf1b1bd32a69711488d71554706bb130b1fc63a5fa1a2cd85e8440f84065ba2360405160405180910390a25b600101610f13565b5060005b815181101561105757610fed828281518110610fd557610fd5611e86565b602002602001015160096115cd90919063ffffffff16565b1561104f5781818151811061100457611004611e86565b602002602001015173ffffffffffffffffffffffffffffffffffffffff167f1795838dc8ab2ffc5f431a1729a6afa0b587f982f7b2be0b9d7187a1ef547f9160405160405180910390a25b600101610fb7565b505050565b602081015160005b81518110156110f757600082828151811061108157611081611e86565b6020026020010151905061109f8160026115cd90919063ffffffff16565b156110ee5760405173ffffffffffffffffffffffffffffffffffffffff821681527fc3803387881faad271c47728894e3e36fac830ffc8602ca6fc07733cbda775809060200160405180910390a15b50600101611064565b50815160005b81518110156107e157600082828151811061111a5761111a611e86565b60200260200101519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361118a576040517f8579befe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6111956002826115ab565b5060405173ffffffffffffffffffffffffffffffffffffffff821681527feb1b9b92e50b7f88f9ff25d56765095ac6e91540eee214906f4036a908ffbdef9060200160405180910390a1506001016110fd565b604080518082019091526000808252602082015260008260000151905060008173ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015611252573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112769190611f6e565b50505091505060008112156112b7576040517f10cb51d100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000819050600085602001518473ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa15801561130e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113329190611fbe565b61133c9190611fdb565b905060248160ff16111561137157611355602482611ff4565b61136090600a61212d565b61136a9083611de3565b9150611394565b61137c816024611ff4565b61138790600a61212d565b6113919083611dcc565b91505b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8211156113ea576040517f10cb51d100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50604080518082019091527bffffffffffffffffffffffffffffffffffffffffffffffffffffffff909116815263ffffffff42166020820152949350505050565b3373ffffffffffffffffffffffffffffffffffffffff8216036114aa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640161094e565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b60608160000180548060200260200160405190810160405280929190818152602001828054801561157057602002820191906000526020600020905b81548152602001906001019080831161155c575b50505050509050919050565b73ffffffffffffffffffffffffffffffffffffffff811660009081526001830160205260408120541515610b02565b6000610b028373ffffffffffffffffffffffffffffffffffffffff84166115ef565b6000610b028373ffffffffffffffffffffffffffffffffffffffff841661163e565b6000818152600183016020526040812054611636575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556108c0565b5060006108c0565b60008181526001830160205260408120548015611727576000611662600183611f41565b855490915060009061167690600190611f41565b90508181146116db57600086600001828154811061169657611696611e86565b90600052602060002001549050808760000184815481106116b9576116b9611e86565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806116ec576116ec61213c565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506108c0565b60009150506108c0565b803573ffffffffffffffffffffffffffffffffffffffff8116811461175557600080fd5b919050565b60008060006060848603121561176f57600080fd5b61177884611731565b92506020840135915061178d60408501611731565b90509250925092565b60006020808352835180602085015260005b818110156117c4578581018301518582016040015282016117a8565b5060006040828601015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8301168501019250505092915050565b6020808252825182820181905260009190848201906040850190845b8181101561185157835173ffffffffffffffffffffffffffffffffffffffff168352928401929184019160010161181f565b50909695505050505050565b60006020828403121561186f57600080fd5b813567ffffffffffffffff81111561188657600080fd5b820160408185031215610b0257600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040805190810167ffffffffffffffff811182821017156118ea576118ea611898565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff8111828210171561193757611937611898565b604052919050565b600067ffffffffffffffff82111561195957611959611898565b5060051b60200190565b60ff811681146107f857600080fd5b6000602080838503121561198557600080fd5b823567ffffffffffffffff81111561199c57600080fd5b8301601f810185136119ad57600080fd5b80356119c06119bb8261193f565b6118f0565b818152606091820283018401918482019190888411156119df57600080fd5b938501935b83851015611a7f57848903818112156119fd5760008081fd5b611a056118c7565b611a0e87611731565b81526040807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe084011215611a425760008081fd5b611a4a6118c7565b9250611a57898901611731565b8352870135611a6581611963565b8289015280880191909152835293840193918501916119e4565b50979650505050505050565b60008060208385031215611a9e57600080fd5b823567ffffffffffffffff80821115611ab657600080fd5b818501915085601f830112611aca57600080fd5b813581811115611ad957600080fd5b8660208260051b8501011115611aee57600080fd5b60209290920196919550909350505050565b602080825282518282018190526000919060409081850190868401855b82811015611b6e57611b5e84835180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16825260209081015163ffffffff16910152565b9284019290850190600101611b1d565b5091979650505050505050565b600060208284031215611b8d57600080fd5b610b0282611731565b803567ffffffffffffffff8116811461175557600080fd5b600060208284031215611bc057600080fd5b610b0282611b96565b81517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16815260208083015163ffffffff1690820152604081016108c0565b600082601f830112611c1557600080fd5b81356020611c256119bb8361193f565b8083825260208201915060208460051b870101935086841115611c4757600080fd5b602086015b84811015611c6a57611c5d81611731565b8352918301918301611c4c565b509695505050505050565b60008060408385031215611c8857600080fd5b823567ffffffffffffffff80821115611ca057600080fd5b611cac86838701611c04565b93506020850135915080821115611cc257600080fd5b50611ccf85828601611c04565b9150509250929050565b600060208284031215611ceb57600080fd5b813567ffffffffffffffff80821115611d0357600080fd5b9083019060408286031215611d1757600080fd5b611d1f6118c7565b823582811115611d2e57600080fd5b611d3a87828601611c04565b825250602083013582811115611d4f57600080fd5b611d5b87828601611c04565b60208301525095945050505050565b60008060408385031215611d7d57600080fd5b611d8683611731565b9150611d9460208401611b96565b90509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b80820281158282048414176108c0576108c0611d9d565b600082611e19577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112611e5357600080fd5b83018035915067ffffffffffffffff821115611e6e57600080fd5b6020019150600681901b3603821315610c9e57600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b80357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8116811461175557600080fd5b600060408284031215611ef357600080fd5b611efb6118c7565b611f0483611731565b8152611f1260208401611eb5565b60208201529392505050565b600060408284031215611f3057600080fd5b611f386118c7565b611f0483611b96565b818103818111156108c0576108c0611d9d565b805169ffffffffffffffffffff8116811461175557600080fd5b600080600080600060a08688031215611f8657600080fd5b611f8f86611f54565b9450602086015193506040860151925060608601519150611fb260808701611f54565b90509295509295909350565b600060208284031215611fd057600080fd5b8151610b0281611963565b60ff81811683821601908111156108c0576108c0611d9d565b60ff82811682821603908111156108c0576108c0611d9d565b600181815b8085111561206657817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0482111561204c5761204c611d9d565b8085161561205957918102915b93841c9390800290612012565b509250929050565b60008261207d575060016108c0565b8161208a575060006108c0565b81600181146120a057600281146120aa576120c6565b60019150506108c0565b60ff8411156120bb576120bb611d9d565b50506001821b6108c0565b5060208310610133831016604e8410600b84101617156120e9575081810a6108c0565b6120f3838361200d565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0482111561212557612125611d9d565b029392505050565b6000610b0260ff84168361206e565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea164736f6c6343000818000a", + ABI: "[{\"inputs\":[{\"components\":[{\"internalType\":\"uint96\",\"name\":\"maxFeeJuelsPerMsg\",\"type\":\"uint96\"},{\"internalType\":\"address\",\"name\":\"linkToken\",\"type\":\"address\"}],\"internalType\":\"structPriceRegistry.StaticConfig\",\"name\":\"staticConfig\",\"type\":\"tuple\"},{\"internalType\":\"address[]\",\"name\":\"priceUpdaters\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"feeTokens\",\"type\":\"address[]\"},{\"internalType\":\"uint32\",\"name\":\"stalenessThreshold\",\"type\":\"uint32\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"sourceToken\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"dataFeedAddress\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"tokenDecimals\",\"type\":\"uint8\"}],\"internalType\":\"structIPriceRegistry.TokenPriceFeedConfig\",\"name\":\"feedConfig\",\"type\":\"tuple\"}],\"internalType\":\"structPriceRegistry.TokenPriceFeedUpdate[]\",\"name\":\"tokenPriceFeeds\",\"type\":\"tuple[]\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"minFeeUSDCents\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxFeeUSDCents\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"deciBps\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"destGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"destBytesOverhead\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"}],\"internalType\":\"structPriceRegistry.TokenTransferFeeConfig\",\"name\":\"tokenTransferFeeConfig\",\"type\":\"tuple\"}],\"internalType\":\"structPriceRegistry.TokenTransferFeeConfigSingleTokenArgs[]\",\"name\":\"tokenTransferFeeConfigs\",\"type\":\"tuple[]\"}],\"internalType\":\"structPriceRegistry.TokenTransferFeeConfigArgs[]\",\"name\":\"tokenTransferFeeConfigArgs\",\"type\":\"tuple[]\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"premiumMultiplierWeiPerEth\",\"type\":\"uint64\"}],\"internalType\":\"structPriceRegistry.PremiumMultiplierWeiPerEthArgs[]\",\"name\":\"premiumMultiplierWeiPerEthArgs\",\"type\":\"tuple[]\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint16\",\"name\":\"maxNumberOfTokensPerMsg\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"maxDataBytes\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxPerMsgGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"destGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"destGasPerPayloadByte\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"destDataAvailabilityOverheadGas\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"destGasPerDataAvailabilityByte\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"destDataAvailabilityMultiplierBps\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"defaultTokenFeeUSDCents\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"defaultTokenDestGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"defaultTokenDestBytesOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"defaultTxGasLimit\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"gasMultiplierWeiPerEth\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"networkFeeUSDCents\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"enforceOutOfOrder\",\"type\":\"bool\"},{\"internalType\":\"bytes4\",\"name\":\"chainFamilySelector\",\"type\":\"bytes4\"}],\"internalType\":\"structPriceRegistry.DestChainDynamicConfig\",\"name\":\"dynamicConfig\",\"type\":\"tuple\"}],\"internalType\":\"structPriceRegistry.DestChainDynamicConfigArgs[]\",\"name\":\"destChainConfigArgs\",\"type\":\"tuple[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chain\",\"type\":\"uint64\"}],\"name\":\"ChainNotSupported\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DataFeedValueOutOfUint224Range\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"}],\"name\":\"DestinationChainNotEnabled\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ExtraArgOutOfOrderExecutionMustBeTrue\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"destBytesOverhead\",\"type\":\"uint32\"}],\"name\":\"InvalidDestBytesOverhead\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"}],\"name\":\"InvalidDestChainConfig\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"encodedAddress\",\"type\":\"bytes\"}],\"name\":\"InvalidEVMAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidExtraArgsTag\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidStalenessThreshold\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidStaticConfig\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"msgFeeJuels\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxFeeJuelsPerMsg\",\"type\":\"uint256\"}],\"name\":\"MessageFeeTooHigh\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MessageGasLimitTooHigh\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maxSize\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"actualSize\",\"type\":\"uint256\"}],\"name\":\"MessageTooLarge\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"NotAFeeToken\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"SourceTokenDataTooLarge\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"uint256\",\"name\":\"threshold\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timePassed\",\"type\":\"uint256\"}],\"name\":\"StaleGasPrice\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"TokenNotSupported\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"}],\"name\":\"UnauthorizedCaller\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnsupportedNumberOfTokens\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddressNotAllowed\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"}],\"name\":\"AuthorizedCallerAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"}],\"name\":\"AuthorizedCallerRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint16\",\"name\":\"maxNumberOfTokensPerMsg\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"maxDataBytes\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxPerMsgGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"destGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"destGasPerPayloadByte\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"destDataAvailabilityOverheadGas\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"destGasPerDataAvailabilityByte\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"destDataAvailabilityMultiplierBps\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"defaultTokenFeeUSDCents\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"defaultTokenDestGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"defaultTokenDestBytesOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"defaultTxGasLimit\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"gasMultiplierWeiPerEth\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"networkFeeUSDCents\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"enforceOutOfOrder\",\"type\":\"bool\"},{\"internalType\":\"bytes4\",\"name\":\"chainFamilySelector\",\"type\":\"bytes4\"}],\"indexed\":false,\"internalType\":\"structPriceRegistry.DestChainDynamicConfig\",\"name\":\"dynamicConfig\",\"type\":\"tuple\"}],\"name\":\"DestChainAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint16\",\"name\":\"maxNumberOfTokensPerMsg\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"maxDataBytes\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxPerMsgGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"destGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"destGasPerPayloadByte\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"destDataAvailabilityOverheadGas\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"destGasPerDataAvailabilityByte\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"destDataAvailabilityMultiplierBps\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"defaultTokenFeeUSDCents\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"defaultTokenDestGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"defaultTokenDestBytesOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"defaultTxGasLimit\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"gasMultiplierWeiPerEth\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"networkFeeUSDCents\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"enforceOutOfOrder\",\"type\":\"bool\"},{\"internalType\":\"bytes4\",\"name\":\"chainFamilySelector\",\"type\":\"bytes4\"}],\"indexed\":false,\"internalType\":\"structPriceRegistry.DestChainDynamicConfig\",\"name\":\"dynamicConfig\",\"type\":\"tuple\"}],\"name\":\"DestChainDynamicConfigUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"feeToken\",\"type\":\"address\"}],\"name\":\"FeeTokenAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"feeToken\",\"type\":\"address\"}],\"name\":\"FeeTokenRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"premiumMultiplierWeiPerEth\",\"type\":\"uint64\"}],\"name\":\"PremiumMultiplierWeiPerEthUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"dataFeedAddress\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"tokenDecimals\",\"type\":\"uint8\"}],\"indexed\":false,\"internalType\":\"structIPriceRegistry.TokenPriceFeedConfig\",\"name\":\"priceFeedConfig\",\"type\":\"tuple\"}],\"name\":\"PriceFeedPerTokenUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"priceUpdater\",\"type\":\"address\"}],\"name\":\"PriceUpdaterRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"priceUpdater\",\"type\":\"address\"}],\"name\":\"PriceUpdaterSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"TokenTransferFeeConfigDeleted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"minFeeUSDCents\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxFeeUSDCents\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"deciBps\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"destGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"destBytesOverhead\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"}],\"indexed\":false,\"internalType\":\"structPriceRegistry.TokenTransferFeeConfig\",\"name\":\"tokenTransferFeeConfig\",\"type\":\"tuple\"}],\"name\":\"TokenTransferFeeConfigUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"UsdPerTokenUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"destChain\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"UsdPerUnitGasUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address[]\",\"name\":\"addedCallers\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"removedCallers\",\"type\":\"address[]\"}],\"internalType\":\"structAuthorizedCallers.AuthorizedCallerArgs\",\"name\":\"authorizedCallerArgs\",\"type\":\"tuple\"}],\"name\":\"applyAuthorizedCallerUpdates\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint16\",\"name\":\"maxNumberOfTokensPerMsg\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"maxDataBytes\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxPerMsgGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"destGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"destGasPerPayloadByte\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"destDataAvailabilityOverheadGas\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"destGasPerDataAvailabilityByte\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"destDataAvailabilityMultiplierBps\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"defaultTokenFeeUSDCents\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"defaultTokenDestGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"defaultTokenDestBytesOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"defaultTxGasLimit\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"gasMultiplierWeiPerEth\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"networkFeeUSDCents\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"enforceOutOfOrder\",\"type\":\"bool\"},{\"internalType\":\"bytes4\",\"name\":\"chainFamilySelector\",\"type\":\"bytes4\"}],\"internalType\":\"structPriceRegistry.DestChainDynamicConfig\",\"name\":\"dynamicConfig\",\"type\":\"tuple\"}],\"internalType\":\"structPriceRegistry.DestChainDynamicConfigArgs[]\",\"name\":\"destChainConfigArgs\",\"type\":\"tuple[]\"}],\"name\":\"applyDestChainConfigUpdates\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"feeTokensToAdd\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"feeTokensToRemove\",\"type\":\"address[]\"}],\"name\":\"applyFeeTokensUpdates\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"premiumMultiplierWeiPerEth\",\"type\":\"uint64\"}],\"internalType\":\"structPriceRegistry.PremiumMultiplierWeiPerEthArgs[]\",\"name\":\"premiumMultiplierWeiPerEthArgs\",\"type\":\"tuple[]\"}],\"name\":\"applyPremiumMultiplierWeiPerEthUpdates\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"minFeeUSDCents\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxFeeUSDCents\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"deciBps\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"destGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"destBytesOverhead\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"}],\"internalType\":\"structPriceRegistry.TokenTransferFeeConfig\",\"name\":\"tokenTransferFeeConfig\",\"type\":\"tuple\"}],\"internalType\":\"structPriceRegistry.TokenTransferFeeConfigSingleTokenArgs[]\",\"name\":\"tokenTransferFeeConfigs\",\"type\":\"tuple[]\"}],\"internalType\":\"structPriceRegistry.TokenTransferFeeConfigArgs[]\",\"name\":\"tokenTransferFeeConfigArgs\",\"type\":\"tuple[]\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"internalType\":\"structPriceRegistry.TokenTransferFeeConfigRemoveArgs[]\",\"name\":\"tokensToUseDefaultFeeConfigs\",\"type\":\"tuple[]\"}],\"name\":\"applyTokenTransferFeeConfigUpdates\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"fromToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"fromTokenAmount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"toToken\",\"type\":\"address\"}],\"name\":\"convertTokenAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllAuthorizedCallers\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"}],\"name\":\"getDestChainDynamicConfig\",\"outputs\":[{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint16\",\"name\":\"maxNumberOfTokensPerMsg\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"maxDataBytes\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxPerMsgGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"destGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"destGasPerPayloadByte\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"destDataAvailabilityOverheadGas\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"destGasPerDataAvailabilityByte\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"destDataAvailabilityMultiplierBps\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"defaultTokenFeeUSDCents\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"defaultTokenDestGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"defaultTokenDestBytesOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"defaultTxGasLimit\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"gasMultiplierWeiPerEth\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"networkFeeUSDCents\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"enforceOutOfOrder\",\"type\":\"bool\"},{\"internalType\":\"bytes4\",\"name\":\"chainFamilySelector\",\"type\":\"bytes4\"}],\"internalType\":\"structPriceRegistry.DestChainDynamicConfig\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"}],\"name\":\"getDestinationChainGasPrice\",\"outputs\":[{\"components\":[{\"internalType\":\"uint224\",\"name\":\"value\",\"type\":\"uint224\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"}],\"internalType\":\"structInternal.TimestampedPackedUint224\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getFeeTokens\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"getPremiumMultiplierWeiPerEth\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"premiumMultiplierWeiPerEth\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getStalenessThreshold\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getStaticConfig\",\"outputs\":[{\"components\":[{\"internalType\":\"uint96\",\"name\":\"maxFeeJuelsPerMsg\",\"type\":\"uint96\"},{\"internalType\":\"address\",\"name\":\"linkToken\",\"type\":\"address\"}],\"internalType\":\"structPriceRegistry.StaticConfig\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"}],\"name\":\"getTokenAndGasPrices\",\"outputs\":[{\"internalType\":\"uint224\",\"name\":\"tokenPrice\",\"type\":\"uint224\"},{\"internalType\":\"uint224\",\"name\":\"gasPriceValue\",\"type\":\"uint224\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"getTokenPrice\",\"outputs\":[{\"components\":[{\"internalType\":\"uint224\",\"name\":\"value\",\"type\":\"uint224\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"}],\"internalType\":\"structInternal.TimestampedPackedUint224\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"getTokenPriceFeedConfig\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"dataFeedAddress\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"tokenDecimals\",\"type\":\"uint8\"}],\"internalType\":\"structIPriceRegistry.TokenPriceFeedConfig\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"}],\"name\":\"getTokenPrices\",\"outputs\":[{\"components\":[{\"internalType\":\"uint224\",\"name\":\"value\",\"type\":\"uint224\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"}],\"internalType\":\"structInternal.TimestampedPackedUint224[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"getTokenTransferFeeConfig\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"minFeeUSDCents\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxFeeUSDCents\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"deciBps\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"destGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"destBytesOverhead\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"}],\"internalType\":\"structPriceRegistry.TokenTransferFeeConfig\",\"name\":\"tokenTransferFeeConfig\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"bytes\",\"name\":\"receiver\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"structClient.EVMTokenAmount[]\",\"name\":\"tokenAmounts\",\"type\":\"tuple[]\"},{\"internalType\":\"address\",\"name\":\"feeToken\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"extraArgs\",\"type\":\"bytes\"}],\"internalType\":\"structClient.EVM2AnyMessage\",\"name\":\"message\",\"type\":\"tuple\"}],\"name\":\"getValidatedFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"feeTokenAmount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"sequenceNumber\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"nonce\",\"type\":\"uint64\"}],\"internalType\":\"structInternal.RampMessageHeader\",\"name\":\"header\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"receiver\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"extraArgs\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"feeToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"feeTokenAmount\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes\",\"name\":\"sourcePoolAddress\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"destTokenAddress\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"structInternal.RampTokenAmount[]\",\"name\":\"tokenAmounts\",\"type\":\"tuple[]\"}],\"internalType\":\"structInternal.EVM2AnyRampMessage\",\"name\":\"message\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"structClient.EVMTokenAmount[]\",\"name\":\"sourceTokenAmounts\",\"type\":\"tuple[]\"}],\"name\":\"getValidatedRampMessageParams\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"msgFeeJuels\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"isOutOfOrderExecution\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"convertedExtraArgs\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"getValidatedTokenPrice\",\"outputs\":[{\"internalType\":\"uint224\",\"name\":\"\",\"type\":\"uint224\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"typeAndVersion\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"sourceToken\",\"type\":\"address\"},{\"internalType\":\"uint224\",\"name\":\"usdPerToken\",\"type\":\"uint224\"}],\"internalType\":\"structInternal.TokenPriceUpdate[]\",\"name\":\"tokenPriceUpdates\",\"type\":\"tuple[]\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"uint224\",\"name\":\"usdPerUnitGas\",\"type\":\"uint224\"}],\"internalType\":\"structInternal.GasPriceUpdate[]\",\"name\":\"gasPriceUpdates\",\"type\":\"tuple[]\"}],\"internalType\":\"structInternal.PriceUpdates\",\"name\":\"priceUpdates\",\"type\":\"tuple\"}],\"name\":\"updatePrices\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"sourceToken\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"dataFeedAddress\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"tokenDecimals\",\"type\":\"uint8\"}],\"internalType\":\"structIPriceRegistry.TokenPriceFeedConfig\",\"name\":\"feedConfig\",\"type\":\"tuple\"}],\"internalType\":\"structPriceRegistry.TokenPriceFeedUpdate[]\",\"name\":\"tokenPriceFeedUpdates\",\"type\":\"tuple[]\"}],\"name\":\"updateTokenPriceFeeds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x60e06040523480156200001157600080fd5b5060405162007046380380620070468339810160408190526200003491620017d1565b8633806000816200008c5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000bf57620000bf8162000219565b5050604080518082018252838152815160008152602080820190935291810191909152620000ee9150620002c4565b5060208801516001600160a01b0316158062000112575087516001600160601b0316155b15620001315760405163d794ef9560e01b815260040160405180910390fd5b6020888101516001600160a01b031660a05288516001600160601b031660805263ffffffff861660c052604080516000815291820190526200017590879062000413565b62000180846200055b565b8463ffffffff16600003620001a857604051631151410960e11b815260040160405180910390fd5b620001b3816200062c565b620001be8262000a94565b604080516000808252602082019092526200020b9185919062000204565b6040805180820190915260008082526020820152815260200190600190039081620001dc5790505b5062000b60565b505050505050505062001aa7565b336001600160a01b03821603620002735760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000083565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b602081015160005b815181101562000354576000828281518110620002ed57620002ed62001902565b602090810291909101015190506200030760028262000e93565b156200034a576040516001600160a01b03821681527fc3803387881faad271c47728894e3e36fac830ffc8602ca6fc07733cbda775809060200160405180910390a15b50600101620002cc565b50815160005b81518110156200040d5760008282815181106200037b576200037b62001902565b6020026020010151905060006001600160a01b0316816001600160a01b031603620003b9576040516342bcdf7f60e11b815260040160405180910390fd5b620003c660028262000eb3565b506040516001600160a01b03821681527feb1b9b92e50b7f88f9ff25d56765095ac6e91540eee214906f4036a908ffbdef9060200160405180910390a1506001016200035a565b50505050565b60005b8251811015620004b4576200045283828151811062000439576200043962001902565b6020026020010151600c62000eb360201b90919060201c565b15620004ab578281815181106200046d576200046d62001902565b60200260200101516001600160a01b03167fdf1b1bd32a69711488d71554706bb130b1fc63a5fa1a2cd85e8440f84065ba2360405160405180910390a25b60010162000416565b5060005b81518110156200055657620004f4828281518110620004db57620004db62001902565b6020026020010151600c62000e9360201b90919060201c565b156200054d578181815181106200050f576200050f62001902565b60200260200101516001600160a01b03167f1795838dc8ab2ffc5f431a1729a6afa0b587f982f7b2be0b9d7187a1ef547f9160405160405180910390a25b600101620004b8565b505050565b60005b8151811015620006285760008282815181106200057f576200057f62001902565b6020908102919091018101518051818301516001600160a01b0380831660008181526006875260409081902084518154868a018051929096166001600160a81b03199091168117600160a01b60ff9384160217909255825191825293519093169683019690965293955091939092917f08a5f7f5bb38a81d8e43aca13ecd76431dbf8816ae4699affff7b00b2fc1c464910160405180910390a25050508060010190506200055e565b5050565b60005b81518110156200062857600082828151811062000650576200065062001902565b60200260200101519050600083838151811062000671576200067162001902565b6020026020010151600001519050600082602001519050816001600160401b031660001480620006ad57506101808101516001600160401b0316155b80620006cf57506102008101516001600160e01b031916630a04b54b60e21b14155b80620006e65750602081610160015163ffffffff16105b15620007115760405163c35aa79d60e01b81526001600160401b038316600482015260240162000083565b6001600160401b038216600090815260086020526040812060010154600160c81b900460e01b6001600160e01b03191690036200079157816001600160401b03167fd883f18d08e8ea5c2af22d13fb6cab86cc057d795d2735f83a8ff137d39d1b8f8260405162000783919062001918565b60405180910390a2620007d5565b816001600160401b03167fd42d3a670a4f1ab5d8703efa22bb17041446365cfcfa33980ced685a080cf7cb82604051620007cc919062001918565b60405180910390a25b8060086000846001600160401b03166001600160401b0316815260200190815260200160002060008201518160000160006101000a81548160ff02191690831515021790555060208201518160000160016101000a81548161ffff021916908361ffff16021790555060408201518160000160036101000a81548163ffffffff021916908363ffffffff16021790555060608201518160000160076101000a81548163ffffffff021916908363ffffffff160217905550608082015181600001600b6101000a81548163ffffffff021916908363ffffffff16021790555060a082015181600001600f6101000a81548161ffff021916908361ffff16021790555060c08201518160000160116101000a81548163ffffffff021916908363ffffffff16021790555060e08201518160000160156101000a81548161ffff021916908361ffff1602179055506101008201518160000160176101000a81548161ffff021916908361ffff1602179055506101208201518160000160196101000a81548161ffff021916908361ffff16021790555061014082015181600001601b6101000a81548163ffffffff021916908363ffffffff1602179055506101608201518160010160006101000a81548163ffffffff021916908363ffffffff1602179055506101808201518160010160046101000a8154816001600160401b0302191690836001600160401b031602179055506101a082015181600101600c6101000a8154816001600160401b0302191690836001600160401b031602179055506101c08201518160010160146101000a81548163ffffffff021916908363ffffffff1602179055506101e08201518160010160186101000a81548160ff0219169083151502179055506102008201518160010160196101000a81548163ffffffff021916908360e01c02179055509050505050508060010190506200062f565b60005b81518110156200062857600082828151811062000ab85762000ab862001902565b6020026020010151600001519050600083838151811062000add5762000add62001902565b6020908102919091018101518101516001600160a01b03841660008181526007845260409081902080546001600160401b0319166001600160401b0385169081179091559051908152919350917fbb77da6f7210cdd16904228a9360133d1d7dfff99b1bc75f128da5b53e28f97d910160405180910390a2505060010162000a97565b60005b825181101562000dcd57600083828151811062000b845762000b8462001902565b6020026020010151905060008160000151905060005b82602001515181101562000dbe5760008360200151828151811062000bc35762000bc362001902565b602002602001015160200151905060008460200151838151811062000bec5762000bec62001902565b60200260200101516000015190506020826080015163ffffffff16101562000c455760808201516040516312766e0160e11b81526001600160a01b038316600482015263ffffffff909116602482015260440162000083565b6001600160401b03841660008181526009602090815260408083206001600160a01b0386168085529083529281902086518154938801518389015160608a015160808b015160a08c01511515600160901b0260ff60901b1963ffffffff928316600160701b021664ffffffffff60701b199383166a01000000000000000000000263ffffffff60501b1961ffff90961668010000000000000000029590951665ffffffffffff60401b19968416640100000000026001600160401b0319909b16939097169290921798909817939093169390931717919091161792909217909155519091907f94967ae9ea7729ad4f54021c1981765d2b1d954f7c92fbec340aa0a54f46b8b59062000dab908690600060c08201905063ffffffff80845116835280602085015116602084015261ffff60408501511660408401528060608501511660608401528060808501511660808401525060a0830151151560a083015292915050565b60405180910390a3505060010162000b9a565b50505080600101905062000b63565b5060005b81518110156200055657600082828151811062000df25762000df262001902565b6020026020010151600001519050600083838151811062000e175762000e1762001902565b6020908102919091018101518101516001600160401b03841660008181526009845260408082206001600160a01b038516808452955280822080546001600160981b03191690555192945090917f4de5b1bcbca6018c11303a2c3f4a4b4f22a1c741d8c4ba430d246ac06c5ddf8b9190a3505060010162000dd1565b600062000eaa836001600160a01b03841662000eca565b90505b92915050565b600062000eaa836001600160a01b03841662000fce565b6000818152600183016020526040812054801562000fc357600062000ef160018362001a6f565b855490915060009062000f079060019062001a6f565b905081811462000f7357600086600001828154811062000f2b5762000f2b62001902565b906000526020600020015490508087600001848154811062000f515762000f5162001902565b6000918252602080832090910192909255918252600188019052604090208390555b855486908062000f875762000f8762001a91565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505062000ead565b600091505062000ead565b6000818152600183016020526040812054620010175750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915562000ead565b50600062000ead565b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b03811182821017156200105b576200105b62001020565b60405290565b60405160c081016001600160401b03811182821017156200105b576200105b62001020565b60405161022081016001600160401b03811182821017156200105b576200105b62001020565b604051601f8201601f191681016001600160401b0381118282101715620010d757620010d762001020565b604052919050565b80516001600160a01b0381168114620010f757600080fd5b919050565b6000604082840312156200110f57600080fd5b6200111962001036565b82519091506001600160601b03811681146200113457600080fd5b81526200114460208301620010df565b602082015292915050565b60006001600160401b038211156200116b576200116b62001020565b5060051b60200190565b600082601f8301126200118757600080fd5b81516020620011a06200119a836200114f565b620010ac565b8083825260208201915060208460051b870101935086841115620011c357600080fd5b602086015b84811015620011ea57620011dc81620010df565b8352918301918301620011c8565b509695505050505050565b805163ffffffff81168114620010f757600080fd5b600082601f8301126200121c57600080fd5b815160206200122f6200119a836200114f565b828152606092830285018201928282019190878511156200124f57600080fd5b8387015b85811015620012e257808903828112156200126e5760008081fd5b6200127862001036565b6200128383620010df565b8152604080601f19840112156200129a5760008081fd5b620012a462001036565b9250620012b3888501620010df565b835283015160ff81168114620012c95760008081fd5b8288015280870191909152845292840192810162001253565b5090979650505050505050565b80516001600160401b0381168114620010f757600080fd5b805161ffff81168114620010f757600080fd5b80518015158114620010f757600080fd5b600082601f8301126200133d57600080fd5b81516020620013506200119a836200114f565b82815260059290921b840181019181810190868411156200137057600080fd5b8286015b84811015620011ea5780516001600160401b03808211156200139557600080fd5b908801906040601f19838c038101821315620013b057600080fd5b620013ba62001036565b620013c7898601620012ef565b81528285015184811115620013db57600080fd5b8086019550508c603f860112620013f157600080fd5b888501519350620014066200119a856200114f565b84815260e09094028501830193898101908e8611156200142557600080fd5b958401955b85871015620014fe57868f0360e08112156200144557600080fd5b6200144f62001036565b6200145a89620010df565b815260c086830112156200146d57600080fd5b6200147762001061565b9150620014868d8a01620011f5565b825262001495878a01620011f5565b8d830152620014a760608a0162001307565b87830152620014b960808a01620011f5565b6060830152620014cc60a08a01620011f5565b6080830152620014df60c08a016200131a565b60a0830152808d0191909152825260e09690960195908a01906200142a565b828b01525087525050509284019250830162001374565b600082601f8301126200152757600080fd5b815160206200153a6200119a836200114f565b82815260069290921b840181019181810190868411156200155a57600080fd5b8286015b84811015620011ea5760408189031215620015795760008081fd5b6200158362001036565b6200158e82620010df565b81526200159d858301620012ef565b818601528352918301916040016200155e565b80516001600160e01b031981168114620010f757600080fd5b600082601f830112620015db57600080fd5b81516020620015ee6200119a836200114f565b82815261024092830285018201928282019190878511156200160f57600080fd5b8387015b85811015620012e257808903828112156200162e5760008081fd5b6200163862001036565b6200164383620012ef565b815261022080601f19840112156200165b5760008081fd5b6200166562001086565b9250620016748885016200131a565b835260406200168581860162001307565b89850152606062001698818701620011f5565b8286015260809150620016ad828701620011f5565b9085015260a0620016c0868201620011f5565b8286015260c09150620016d582870162001307565b9085015260e0620016e8868201620011f5565b828601526101009150620016fe82870162001307565b908501526101206200171286820162001307565b8286015261014091506200172882870162001307565b908501526101606200173c868201620011f5565b82860152610180915062001752828701620011f5565b908501526101a062001766868201620012ef565b828601526101c091506200177c828701620012ef565b908501526101e062001790868201620011f5565b828601526102009150620017a68287016200131a565b90850152620017b7858301620015b0565b908401525080870191909152845292840192810162001613565b600080600080600080600080610120898b031215620017ef57600080fd5b620017fb8a8a620010fc565b60408a01519098506001600160401b03808211156200181957600080fd5b620018278c838d0162001175565b985060608b01519150808211156200183e57600080fd5b6200184c8c838d0162001175565b97506200185c60808c01620011f5565b965060a08b01519150808211156200187357600080fd5b620018818c838d016200120a565b955060c08b01519150808211156200189857600080fd5b620018a68c838d016200132b565b945060e08b0151915080821115620018bd57600080fd5b620018cb8c838d0162001515565b93506101008b0151915080821115620018e357600080fd5b50620018f28b828c01620015c9565b9150509295985092959890939650565b634e487b7160e01b600052603260045260246000fd5b8151151581526102208101602083015162001939602084018261ffff169052565b50604083015162001952604084018263ffffffff169052565b5060608301516200196b606084018263ffffffff169052565b50608083015162001984608084018263ffffffff169052565b5060a08301516200199b60a084018261ffff169052565b5060c0830151620019b460c084018263ffffffff169052565b5060e0830151620019cb60e084018261ffff169052565b506101008381015161ffff9081169184019190915261012080850151909116908301526101408084015163ffffffff9081169184019190915261016080850151821690840152610180808501516001600160401b03908116918501919091526101a080860151909116908401526101c080850151909116908301526101e080840151151590830152610200928301516001600160e01b031916929091019190915290565b8181038181111562000ead57634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603160045260246000fd5b60805160a05160c05161554562001b016000396000818161067f0152818161220f01526122780152600081816102a00152818161123901526112b0015260008181610266015281816112d9015261134901526155456000f3fe608060405234801561001057600080fd5b50600436106101b85760003560e01c806382b49eb0116100f9578063ca64321311610097578063d8694ccd11610071578063d8694ccd14610784578063eedeb98214610797578063f2fde38b14610a3b578063ffdb4b3714610a4e57600080fd5b8063ca64321314610756578063cdc73d5114610769578063d02641a01461077157600080fd5b8063997fb26b116100d3578063997fb26b14610640578063a69c64c014610662578063a6c94a7314610675578063bf78e03f146106a957600080fd5b806382b49eb0146104955780638da5cb5b1461060557806391a2749a1461062d57600080fd5b8063407e108611610166578063514e8cff11610140578063514e8cff146103c4578063770e2dc41461046757806379ba50971461047a5780637afac3221461048257600080fd5b8063407e10861461035157806345ac924d146103645780634ab35b0b1461038457600080fd5b8063181f5a7711610197578063181f5a77146102de5780632451a627146103275780633937306f1461033c57600080fd5b806241e5be146101bd578063061877e3146101e357806306285c691461023c575b600080fd5b6101d06101cb366004613f69565b610a96565b6040519081526020015b60405180910390f35b6102236101f1366004613fa5565b73ffffffffffffffffffffffffffffffffffffffff1660009081526007602052604090205467ffffffffffffffff1690565b60405167ffffffffffffffff90911681526020016101da565b6040805180820182526000808252602091820152815180830183526bffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001680825273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000081169284019283528451918252915190911691810191909152016101da565b61031a6040518060400160405280601781526020017f5072696365526567697374727920312e362e302d64657600000000000000000081525081565b6040516101da9190614024565b61032f610b04565b6040516101da9190614037565b61034f61034a366004614091565b610b15565b005b61034f61035f3660046141ed565b610de9565b610377610372366004614306565b610dfd565b6040516101da919061437b565b610397610392366004613fa5565b610ec8565b6040517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff90911681526020016101da565b61045a6103d236600461440e565b60408051808201909152600080825260208201525067ffffffffffffffff166000908152600460209081526040918290208251808401909352547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff811683527c0100000000000000000000000000000000000000000000000000000000900463ffffffff169082015290565b6040516101da9190614429565b61034f61047536600461453b565b610ed3565b61034f610ee9565b61034f610490366004614855565b610feb565b6105a56104a33660046148b9565b6040805160c081018252600080825260208201819052918101829052606081018290526080810182905260a08101919091525067ffffffffffffffff91909116600090815260096020908152604080832073ffffffffffffffffffffffffffffffffffffffff94909416835292815290829020825160c081018452905463ffffffff8082168352640100000000820481169383019390935268010000000000000000810461ffff16938201939093526a01000000000000000000008304821660608201526e01000000000000000000000000000083049091166080820152720100000000000000000000000000000000000090910460ff16151560a082015290565b6040516101da9190600060c08201905063ffffffff80845116835280602085015116602084015261ffff60408501511660408401528060608501511660608401528060808501511660808401525060a0830151151560a083015292915050565b60005460405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101da565b61034f61063b3660046148e3565b610ffd565b61065361064e366004614974565b61100e565b6040516101da93929190614a17565b61034f610670366004614a41565b6113f6565b60405163ffffffff7f00000000000000000000000000000000000000000000000000000000000000001681526020016101da565b6107226106b7366004613fa5565b6040805180820182526000808252602091820181905273ffffffffffffffffffffffffffffffffffffffff93841681526006825282902082518084019093525492831682527401000000000000000000000000000000000000000090920460ff169181019190915290565b60408051825173ffffffffffffffffffffffffffffffffffffffff16815260209283015160ff1692810192909252016101da565b61034f610764366004614b36565b611407565b61032f611418565b61045a61077f366004613fa5565b611424565b6101d0610792366004614d56565b611520565b610a2e6107a536600461440e565b6040805161022081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810182905261012081018290526101408101829052610160810182905261018081018290526101a081018290526101c081018290526101e081018290526102008101919091525067ffffffffffffffff908116600090815260086020908152604091829020825161022081018452815460ff8082161515835261ffff61010080840482169685019690965263ffffffff630100000084048116978501979097526701000000000000008304871660608501526b0100000000000000000000008304871660808501526f010000000000000000000000000000008304811660a0850152710100000000000000000000000000000000008304871660c085015275010000000000000000000000000000000000000000008304811660e0808601919091527701000000000000000000000000000000000000000000000084048216968501969096527901000000000000000000000000000000000000000000000000008084049091166101208501527b010000000000000000000000000000000000000000000000000000009092048616610140840152600190930154808616610160840152640100000000810487166101808401526c0100000000000000000000000081049096166101a08301527401000000000000000000000000000000000000000086049094166101c08201527801000000000000000000000000000000000000000000000000850490911615156101e08201527fffffffff0000000000000000000000000000000000000000000000000000000092909304901b1661020082015290565b6040516101da9190614dab565b61034f610a49366004613fa5565b61212a565b610a61610a5c366004614f17565b61213b565b604080517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff9384168152929091166020830152016101da565b6000610aa1826122c6565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16610ac8856122c6565b610af0907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1685614f70565b610afa9190614f87565b90505b9392505050565b6060610b106002612360565b905090565b60005473ffffffffffffffffffffffffffffffffffffffff163314610b3c57610b3c61236d565b6000610b488280614fc2565b9050905060005b81811015610c92576000610b638480614fc2565b83818110610b7357610b7361502a565b905060400201803603810190610b899190615085565b604080518082018252602080840180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff908116845263ffffffff42818116858701908152885173ffffffffffffffffffffffffffffffffffffffff9081166000908152600590975295889020965190519092167c010000000000000000000000000000000000000000000000000000000002919092161790935584519051935194955016927f52f50aa6d1a95a4595361ecf953d095f125d442e4673716dede699e049de148a92610c819290917bffffffffffffffffffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b60405180910390a250600101610b4f565b506000610ca26020840184614fc2565b9050905060005b81811015610de3576000610cc06020860186614fc2565b83818110610cd057610cd061502a565b905060400201803603810190610ce691906150c2565b604080518082018252602080840180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff908116845263ffffffff42818116858701908152885167ffffffffffffffff9081166000908152600490975295889020965190519092167c010000000000000000000000000000000000000000000000000000000002919092161790935584519051935194955016927fdd84a3fa9ef9409f550d54d6affec7e9c480c878c6ab27b78912a03e1b371c6e92610dd29290917bffffffffffffffffffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b60405180910390a250600101610ca9565b50505050565b610df16123b2565b610dfa81612433565b50565b60608160008167ffffffffffffffff811115610e1b57610e1b6140cc565b604051908082528060200260200182016040528015610e6057816020015b6040805180820190915260008082526020820152815260200190600190039081610e395790505b50905060005b82811015610ebd57610e98868683818110610e8357610e8361502a565b905060200201602081019061077f9190613fa5565b828281518110610eaa57610eaa61502a565b6020908102919091010152600101610e66565b509150505b92915050565b6000610ec2826122c6565b610edb6123b2565b610ee58282612531565b5050565b60015473ffffffffffffffffffffffffffffffffffffffff163314610f6f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064015b60405180910390fd5b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b610ff36123b2565b610ee5828261293d565b6110056123b2565b610dfa81612a84565b6000806060816110238783016040890161440e565b67ffffffffffffffff811660009081526008602052604081209192505b61104e6101608a018a6150e5565b905081101561122157600088888381811061106b5761106b61502a565b6110819260206040909202019081019150613fa5565b905060006110936101608c018c6150e5565b848181106110a3576110a361502a565b90506020028101906110b5919061514d565b6110c390604081019061518b565b915050602081118015611127575067ffffffffffffffff8516600090815260096020908152604080832073ffffffffffffffffffffffffffffffffffffffff861684529091529020546e010000000000000000000000000000900463ffffffff1681115b15611176576040517f36f536ca00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83166004820152602401610f66565b600184015461121790790100000000000000000000000000000000000000000000000000900460e01b6111ad6101608e018e6150e5565b868181106111bd576111bd61502a565b90506020028101906111cf919061514d565b6111dd90602081019061518b565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612c1092505050565b5050600101611040565b5073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001661126b6101408a016101208b01613fa5565b73ffffffffffffffffffffffffffffffffffffffff16036112935787610140013594506112d7565b6112d46112a86101408a016101208b01613fa5565b8961014001357f0000000000000000000000000000000000000000000000000000000000000000610a96565b94505b7f00000000000000000000000000000000000000000000000000000000000000006bffffffffffffffffffffffff16851115611376576040517f6a92a483000000000000000000000000000000000000000000000000000000008152600481018690526bffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000166024820152604401610f66565b60006113a56113896101008b018b61518b565b6001850154640100000000900467ffffffffffffffff16612c62565b9050806020015194508585826040516020016113d591908151815260209182015115159181019190915260400190565b60405160208183030381529060405295509550955050505093509350939050565b6113fe6123b2565b610dfa81612e0b565b61140f6123b2565b610dfa81612ef5565b6060610b10600c612360565b604080518082019091526000808252602082015273ffffffffffffffffffffffffffffffffffffffff8281166000908152600660209081526040918290208251808401909352549283168083527401000000000000000000000000000000000000000090930460ff16908201529061151757505073ffffffffffffffffffffffffffffffffffffffff166000908152600560209081526040918290208251808401909352547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff811683527c0100000000000000000000000000000000000000000000000000000000900463ffffffff169082015290565b610afd816133ce565b67ffffffffffffffff82166000908152600860205260408120805460ff16611580576040517f99ac52f200000000000000000000000000000000000000000000000000000000815267ffffffffffffffff85166004820152602401610f66565b600061158f6040850185614fc2565b6040805161022081018252855460ff8082161515835261ffff610100808404821660208087019190915263ffffffff630100000086048116978701979097526701000000000000008504871660608701526b0100000000000000000000008504871660808701526f010000000000000000000000000000008504831660a0870152710100000000000000000000000000000000008504871660c087015275010000000000000000000000000000000000000000008504831660e0808801919091527701000000000000000000000000000000000000000000000086048416928701929092527901000000000000000000000000000000000000000000000000008086049093166101208701527b01000000000000000000000000000000000000000000000000000000909404861661014086015260018a015480871661016087015267ffffffffffffffff640100000000820481166101808801526c010000000000000000000000008204166101a08701527401000000000000000000000000000000000000000081049096166101c08601527801000000000000000000000000000000000000000000000000860490921615156101e08501527fffffffff000000000000000000000000000000000000000000000000000000009404901b929092166102008201529193506117d3925061178c9087018761518b565b905083611799888061518b565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061361192505050565b60006007816117e86080880160608901613fa5565b73ffffffffffffffffffffffffffffffffffffffff168152602081019190915260400160009081205467ffffffffffffffff16915081900361187f576118346080860160608701613fa5565b6040517fa7499d2000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091166004820152602401610f66565b60008061189b6118956080890160608a01613fa5565b8961213b565b9092509050600080808615611ad0576040805161022081018252895460ff8082161515835261010080830461ffff90811660208601526301000000840463ffffffff90811696860196909652670100000000000000840486166060808701919091526b010000000000000000000000850487166080808801919091526f010000000000000000000000000000008604831660a0880152710100000000000000000000000000000000008604881660c088015275010000000000000000000000000000000000000000008604831660e0808901919091527701000000000000000000000000000000000000000000000087048416948801949094527901000000000000000000000000000000000000000000000000008087049093166101208801527b01000000000000000000000000000000000000000000000000000000909504871661014087015260018f0154808816610160880152640100000000810467ffffffffffffffff9081166101808901526c010000000000000000000000008204166101a08801527401000000000000000000000000000000000000000081049097166101c08701527801000000000000000000000000000000000000000000000000870490931615156101e086015290940490931b7fffffffff0000000000000000000000000000000000000000000000000000000016610200830152611ac4928e91611aae91908f01908f01613fa5565b888e8060400190611abf9190614fc2565b6136bb565b91945092509050611b07565b6001880154611b049074010000000000000000000000000000000000000000900463ffffffff16662386f26fc10000614f70565b92505b875460009077010000000000000000000000000000000000000000000000900461ffff1615611d4b5760408051610220810182528a5460ff8082161515835261ffff610100808404821660208087019190915263ffffffff630100000086048116978701979097526701000000000000008504871660608701526b0100000000000000000000008504871660808701526f010000000000000000000000000000008504831660a0870152710100000000000000000000000000000000008504871660c087015275010000000000000000000000000000000000000000008504831660e0808801919091527701000000000000000000000000000000000000000000000086048416928701929092527901000000000000000000000000000000000000000000000000008086049093166101208701527b01000000000000000000000000000000000000000000000000000000909404861661014086015260018f015480871661016087015267ffffffffffffffff640100000000820481166101808801526c010000000000000000000000008204166101a08701527401000000000000000000000000000000000000000081049096166101c08601527801000000000000000000000000000000000000000000000000860490921615156101e08501527fffffffff000000000000000000000000000000000000000000000000000000009404901b92909216610200820152611d48916dffffffffffffffffffffffffffff607089901c1690611d3f908f018f61518b565b90508b86613999565b90505b885460009063ffffffff8516906f01000000000000000000000000000000900461ffff16611d7c60208f018f61518b565b611d87929150614f70565b8b54611da891906b010000000000000000000000900463ffffffff166151f0565b611db291906151f0565b905061206f611dc460808e018e61518b565b8c604051806102200160405290816000820160009054906101000a900460ff161515151581526020016000820160019054906101000a900461ffff1661ffff1661ffff1681526020016000820160039054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016000820160079054906101000a900463ffffffff1663ffffffff1663ffffffff16815260200160008201600b9054906101000a900463ffffffff1663ffffffff1663ffffffff16815260200160008201600f9054906101000a900461ffff1661ffff1661ffff1681526020016000820160119054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016000820160159054906101000a900461ffff1661ffff1661ffff1681526020016000820160179054906101000a900461ffff1661ffff1661ffff1681526020016000820160199054906101000a900461ffff1661ffff1661ffff16815260200160008201601b9054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016001820160009054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016001820160049054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff16815260200160018201600c9054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff1681526020016001820160149054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016001820160189054906101000a900460ff161515151581526020016001820160199054906101000a900460e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681525050613a48565b5161207a90826151f0565b60018b01549091506000906c01000000000000000000000000900467ffffffffffffffff166120b9836dffffffffffffffffffffffffffff8a16614f70565b6120c39190614f70565b90507bffffffffffffffffffffffffffffffffffffffffffffffffffffffff881683826120fa67ffffffffffffffff8d168a614f70565b61210491906151f0565b61210e91906151f0565b6121189190614f87565b9e9d5050505050505050505050505050565b6121326123b2565b610dfa81613b03565b67ffffffffffffffff811660009081526004602090815260408083208151808301909252547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff811682527c0100000000000000000000000000000000000000000000000000000000900463ffffffff16918101829052829182036121f3576040517f2e59db3a00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff85166004820152602401610f66565b6000816020015163ffffffff164261220b9190615203565b90507f000000000000000000000000000000000000000000000000000000000000000063ffffffff168111156122ac576040517ff08bcb3e00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff8616600482015263ffffffff7f000000000000000000000000000000000000000000000000000000000000000016602482015260448101829052606401610f66565b6122b5866122c6565b9151919350909150505b9250929050565b6000806122d283611424565b9050806020015163ffffffff166000148061230a575080517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16155b15612359576040517f06439c6b00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84166004820152602401610f66565b5192915050565b60606000610afd83613bf8565b612378600233613c54565b6123b0576040517fd86ad9cf000000000000000000000000000000000000000000000000000000008152336004820152602401610f66565b565b60005473ffffffffffffffffffffffffffffffffffffffff1633146123b0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401610f66565b60005b8151811015610ee55760008282815181106124535761245361502a565b60209081029190910181015180518183015173ffffffffffffffffffffffffffffffffffffffff80831660008181526006875260409081902084518154868a018051929096167fffffffffffffffffffffff00000000000000000000000000000000000000000090911681177401000000000000000000000000000000000000000060ff9384160217909255825191825293519093169683019690965293955091939092917f08a5f7f5bb38a81d8e43aca13ecd76431dbf8816ae4699affff7b00b2fc1c464910160405180910390a2505050806001019050612436565b60005b82518110156128545760008382815181106125515761255161502a565b6020026020010151905060008160000151905060005b8260200151518110156128465760008360200151828151811061258c5761258c61502a565b60200260200101516020015190506000846020015183815181106125b2576125b261502a565b60200260200101516000015190506020826080015163ffffffff16101561262f5760808201516040517f24ecdc0200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8316600482015263ffffffff9091166024820152604401610f66565b67ffffffffffffffff8416600081815260096020908152604080832073ffffffffffffffffffffffffffffffffffffffff86168085529083529281902086518154938801518389015160608a015160808b015160a08c015115157201000000000000000000000000000000000000027fffffffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffff63ffffffff9283166e01000000000000000000000000000002167fffffffffffffffffffffffffff0000000000ffffffffffffffffffffffffffff9383166a0100000000000000000000027fffffffffffffffffffffffffffffffffffff00000000ffffffffffffffffffff61ffff9096166801000000000000000002959095167fffffffffffffffffffffffffffffffffffff000000000000ffffffffffffffff968416640100000000027fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000909b16939097169290921798909817939093169390931717919091161792909217909155519091907f94967ae9ea7729ad4f54021c1981765d2b1d954f7c92fbec340aa0a54f46b8b590612834908690600060c08201905063ffffffff80845116835280602085015116602084015261ffff60408501511660408401528060608501511660608401528060808501511660808401525060a0830151151560a083015292915050565b60405180910390a35050600101612567565b505050806001019050612534565b5060005b81518110156129385760008282815181106128755761287561502a565b602002602001015160000151905060008383815181106128975761289761502a565b60209081029190910181015181015167ffffffffffffffff8416600081815260098452604080822073ffffffffffffffffffffffffffffffffffffffff8516808452955280822080547fffffffffffffffffffffffffff000000000000000000000000000000000000001690555192945090917f4de5b1bcbca6018c11303a2c3f4a4b4f22a1c741d8c4ba430d246ac06c5ddf8b9190a35050600101612858565b505050565b60005b82518110156129e05761297683828151811061295e5761295e61502a565b6020026020010151600c613c8390919063ffffffff16565b156129d85782818151811061298d5761298d61502a565b602002602001015173ffffffffffffffffffffffffffffffffffffffff167fdf1b1bd32a69711488d71554706bb130b1fc63a5fa1a2cd85e8440f84065ba2360405160405180910390a25b600101612940565b5060005b815181101561293857612a1a828281518110612a0257612a0261502a565b6020026020010151600c613ca590919063ffffffff16565b15612a7c57818181518110612a3157612a3161502a565b602002602001015173ffffffffffffffffffffffffffffffffffffffff167f1795838dc8ab2ffc5f431a1729a6afa0b587f982f7b2be0b9d7187a1ef547f9160405160405180910390a25b6001016129e4565b602081015160005b8151811015612b1f576000828281518110612aa957612aa961502a565b60200260200101519050612ac7816002613ca590919063ffffffff16565b15612b165760405173ffffffffffffffffffffffffffffffffffffffff821681527fc3803387881faad271c47728894e3e36fac830ffc8602ca6fc07733cbda775809060200160405180910390a15b50600101612a8c565b50815160005b8151811015610de3576000828281518110612b4257612b4261502a565b60200260200101519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603612bb2576040517f8579befe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b612bbd600282613c83565b5060405173ffffffffffffffffffffffffffffffffffffffff821681527feb1b9b92e50b7f88f9ff25d56765095ac6e91540eee214906f4036a908ffbdef9060200160405180910390a150600101612b25565b7fd7ed2ad4000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831601610ee55761293881613cc7565b60408051808201909152600080825260208201526000839003612ca357506040805180820190915267ffffffffffffffff8216815260006020820152610afd565b6000612caf8486615216565b90506000612cc0856004818961525c565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509293505050507fffffffff0000000000000000000000000000000000000000000000000000000082167fe7e230f00000000000000000000000000000000000000000000000000000000001612d5d5780806020019051810190612d549190615286565b92505050610afd565b7f6859a837000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831601612dd957604051806040016040528082806020019051810190612dc591906152b2565b815260006020909101529250610afd915050565b6040517f5247fdce00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b8151811015610ee5576000828281518110612e2b57612e2b61502a565b60200260200101516000015190506000838381518110612e4d57612e4d61502a565b60209081029190910181015181015173ffffffffffffffffffffffffffffffffffffffff841660008181526007845260409081902080547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff85169081179091559051908152919350917fbb77da6f7210cdd16904228a9360133d1d7dfff99b1bc75f128da5b53e28f97d910160405180910390a25050600101612e0e565b60005b8151811015610ee5576000828281518110612f1557612f1561502a565b602002602001015190506000838381518110612f3357612f3361502a565b60200260200101516000015190506000826020015190508167ffffffffffffffff1660001480612f70575061018081015167ffffffffffffffff16155b80612fc257506102008101517fffffffff00000000000000000000000000000000000000000000000000000000167f2812d52c0000000000000000000000000000000000000000000000000000000014155b80612fd85750602081610160015163ffffffff16105b1561301b576040517fc35aa79d00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff83166004820152602401610f66565b67ffffffffffffffff8216600090815260086020526040812060010154790100000000000000000000000000000000000000000000000000900460e01b7fffffffff000000000000000000000000000000000000000000000000000000001690036130c7578167ffffffffffffffff167fd883f18d08e8ea5c2af22d13fb6cab86cc057d795d2735f83a8ff137d39d1b8f826040516130ba9190614dab565b60405180910390a261310a565b8167ffffffffffffffff167fd42d3a670a4f1ab5d8703efa22bb17041446365cfcfa33980ced685a080cf7cb826040516131019190614dab565b60405180910390a25b80600860008467ffffffffffffffff1667ffffffffffffffff16815260200190815260200160002060008201518160000160006101000a81548160ff02191690831515021790555060208201518160000160016101000a81548161ffff021916908361ffff16021790555060408201518160000160036101000a81548163ffffffff021916908363ffffffff16021790555060608201518160000160076101000a81548163ffffffff021916908363ffffffff160217905550608082015181600001600b6101000a81548163ffffffff021916908363ffffffff16021790555060a082015181600001600f6101000a81548161ffff021916908361ffff16021790555060c08201518160000160116101000a81548163ffffffff021916908363ffffffff16021790555060e08201518160000160156101000a81548161ffff021916908361ffff1602179055506101008201518160000160176101000a81548161ffff021916908361ffff1602179055506101208201518160000160196101000a81548161ffff021916908361ffff16021790555061014082015181600001601b6101000a81548163ffffffff021916908363ffffffff1602179055506101608201518160010160006101000a81548163ffffffff021916908363ffffffff1602179055506101808201518160010160046101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055506101a082015181600101600c6101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055506101c08201518160010160146101000a81548163ffffffff021916908363ffffffff1602179055506101e08201518160010160186101000a81548160ff0219169083151502179055506102008201518160010160196101000a81548163ffffffff021916908360e01c0217905550905050505050806001019050612ef8565b604080518082019091526000808252602082015260008260000151905060008173ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015613438573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061345c91906152e5565b505050915050600081121561349d576040517f10cb51d100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000819050600085602001518473ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa1580156134f4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906135189190615335565b6135229190615352565b905060248160ff1611156135575761353b60248261536b565b61354690600a6154a4565b6135509083614f87565b915061357a565b61356281602461536b565b61356d90600a6154a4565b6135779083614f70565b91505b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8211156135d0576040517f10cb51d100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50604080518082019091527bffffffffffffffffffffffffffffffffffffffffffffffffffffffff909116815263ffffffff42166020820152949350505050565b836040015163ffffffff1683111561366a5760408085015190517f8693378900000000000000000000000000000000000000000000000000000000815263ffffffff909116600482015260248101849052604401610f66565b836020015161ffff168211156136ac576040517f4c056b6a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610de384610200015182612c10565b6000808083815b8181101561398b5760008787838181106136de576136de61502a565b9050604002018036038101906136f491906154b3565b67ffffffffffffffff8c166000908152600960209081526040808320845173ffffffffffffffffffffffffffffffffffffffff168452825291829020825160c081018452905463ffffffff8082168352640100000000820481169383019390935268010000000000000000810461ffff16938201939093526a01000000000000000000008304821660608201526e01000000000000000000000000000083049091166080820152720100000000000000000000000000000000000090910460ff16151560a082018190529192509061381a576101208d01516137e19061ffff16662386f26fc10000614f70565b6137eb90886151f0565b96508c6101400151866137fe91906154ec565b95508c61016001518561381191906154ec565b94505050613983565b604081015160009061ffff16156138d35760008c73ffffffffffffffffffffffffffffffffffffffff16846000015173ffffffffffffffffffffffffffffffffffffffff161461387657835161386f906122c6565b9050613879565b508a5b620186a0836040015161ffff166138bb8660200151847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16613d2290919063ffffffff16565b6138c59190614f70565b6138cf9190614f87565b9150505b60608201516138e290886154ec565b96508160800151866138f491906154ec565b82519096506000906139139063ffffffff16662386f26fc10000614f70565b90508082101561393257613927818a6151f0565b985050505050613983565b6000836020015163ffffffff16662386f26fc100006139519190614f70565b90508083111561397157613965818b6151f0565b99505050505050613983565b61397b838b6151f0565b995050505050505b6001016136c2565b505096509650969350505050565b60008063ffffffff83166139ae60e086614f70565b6139ba876101c06151f0565b6139c491906151f0565b6139ce91906151f0565b905060008760c0015163ffffffff168860e0015161ffff16836139f19190614f70565b6139fb91906151f0565b61010089015190915061ffff16613a226dffffffffffffffffffffffffffff891683614f70565b613a2c9190614f70565b613a3c90655af3107a4000614f70565b98975050505050505050565b60408051808201909152600080825260208201526000613a6e8585856101800151612c62565b9050826060015163ffffffff1681600001511115613ab8576040517f4c4fc93a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b826101e001518015613acc57508060200151155b15610afa576040517fee433e9900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff821603613b82576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401610f66565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b606081600001805480602002602001604051908101604052809291908181526020018280548015613c4857602002820191906000526020600020905b815481526020019060010190808311613c34575b50505050509050919050565b73ffffffffffffffffffffffffffffffffffffffff811660009081526001830160205260408120541515610afd565b6000610afd8373ffffffffffffffffffffffffffffffffffffffff8416613d5f565b6000610afd8373ffffffffffffffffffffffffffffffffffffffff8416613dae565b60008151602014613d0657816040517f8d666f60000000000000000000000000000000000000000000000000000000008152600401610f669190614024565b610ec282806020019051810190613d1d91906152b2565b613ea8565b6000670de0b6b3a7640000613d55837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8616614f70565b610afd9190614f87565b6000818152600183016020526040812054613da657508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610ec2565b506000610ec2565b60008181526001830160205260408120548015613e97576000613dd2600183615203565b8554909150600090613de690600190615203565b9050818114613e4b576000866000018281548110613e0657613e0661502a565b9060005260206000200154905080876000018481548110613e2957613e2961502a565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613e5c57613e5c615509565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610ec2565b6000915050610ec2565b5092915050565b600073ffffffffffffffffffffffffffffffffffffffff821180613ecd575061040082105b15613f3c57604080516020810184905201604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152908290527f8d666f60000000000000000000000000000000000000000000000000000000008252610f6691600401614024565b5090565b803573ffffffffffffffffffffffffffffffffffffffff81168114613f6457600080fd5b919050565b600080600060608486031215613f7e57600080fd5b613f8784613f40565b925060208401359150613f9c60408501613f40565b90509250925092565b600060208284031215613fb757600080fd5b610afd82613f40565b6000815180845260005b81811015613fe657602081850181015186830182015201613fca565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b602081526000610afd6020830184613fc0565b6020808252825182820181905260009190848201906040850190845b8181101561408557835173ffffffffffffffffffffffffffffffffffffffff1683529284019291840191600101614053565b50909695505050505050565b6000602082840312156140a357600080fd5b813567ffffffffffffffff8111156140ba57600080fd5b820160408185031215610afd57600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040805190810167ffffffffffffffff8111828210171561411e5761411e6140cc565b60405290565b60405160c0810167ffffffffffffffff8111828210171561411e5761411e6140cc565b604051610220810167ffffffffffffffff8111828210171561411e5761411e6140cc565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156141b2576141b26140cc565b604052919050565b600067ffffffffffffffff8211156141d4576141d46140cc565b5060051b60200190565b60ff81168114610dfa57600080fd5b6000602080838503121561420057600080fd5b823567ffffffffffffffff81111561421757600080fd5b8301601f8101851361422857600080fd5b803561423b614236826141ba565b61416b565b8181526060918202830184019184820191908884111561425a57600080fd5b938501935b838510156142fa57848903818112156142785760008081fd5b6142806140fb565b61428987613f40565b81526040807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0840112156142bd5760008081fd5b6142c56140fb565b92506142d2898901613f40565b83528701356142e0816141de565b82890152808801919091528352938401939185019161425f565b50979650505050505050565b6000806020838503121561431957600080fd5b823567ffffffffffffffff8082111561433157600080fd5b818501915085601f83011261434557600080fd5b81358181111561435457600080fd5b8660208260051b850101111561436957600080fd5b60209290920196919550909350505050565b602080825282518282018190526000919060409081850190868401855b828110156143e9576143d984835180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16825260209081015163ffffffff16910152565b9284019290850190600101614398565b5091979650505050505050565b803567ffffffffffffffff81168114613f6457600080fd5b60006020828403121561442057600080fd5b610afd826143f6565b81517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16815260208083015163ffffffff169082015260408101610ec2565b803563ffffffff81168114613f6457600080fd5b803561ffff81168114613f6457600080fd5b8015158114610dfa57600080fd5b8035613f648161448a565b600082601f8301126144b457600080fd5b813560206144c4614236836141ba565b82815260069290921b840181019181810190868411156144e357600080fd5b8286015b8481101561453057604081890312156145005760008081fd5b6145086140fb565b614511826143f6565b815261451e858301613f40565b818601528352918301916040016144e7565b509695505050505050565b6000806040838503121561454e57600080fd5b67ffffffffffffffff8335111561456457600080fd5b83601f84358501011261457657600080fd5b61458661423684358501356141ba565b8335840180358083526020808401939260059290921b909101018610156145ac57600080fd5b602085358601015b85358601803560051b016020018110156147b95767ffffffffffffffff813511156145de57600080fd5b8035863587010160407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0828a0301121561461757600080fd5b61461f6140fb565b61462b602083016143f6565b815267ffffffffffffffff6040830135111561464657600080fd5b88603f60408401358401011261465b57600080fd5b61467161423660206040850135850101356141ba565b6020604084810135850182810135808552928401939260e00201018b101561469857600080fd5b6040808501358501015b6040858101358601602081013560e002010181101561479a5760e0818d0312156146cb57600080fd5b6146d36140fb565b6146dc82613f40565b815260c07fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0838f0301121561471057600080fd5b614718614124565b61472460208401614464565b815261473260408401614464565b602082015261474360608401614478565b604082015261475460808401614464565b606082015261476560a08401614464565b608082015261477760c084013561448a565b60c083013560a0820152602082810191909152908452929092019160e0016146a2565b50806020840152505080855250506020830192506020810190506145b4565b5092505067ffffffffffffffff602084013511156147d657600080fd5b6147e684602085013585016144a3565b90509250929050565b600082601f83011261480057600080fd5b81356020614810614236836141ba565b8083825260208201915060208460051b87010193508684111561483257600080fd5b602086015b848110156145305761484881613f40565b8352918301918301614837565b6000806040838503121561486857600080fd5b823567ffffffffffffffff8082111561488057600080fd5b61488c868387016147ef565b935060208501359150808211156148a257600080fd5b506148af858286016147ef565b9150509250929050565b600080604083850312156148cc57600080fd5b6148d5836143f6565b91506147e660208401613f40565b6000602082840312156148f557600080fd5b813567ffffffffffffffff8082111561490d57600080fd5b908301906040828603121561492157600080fd5b6149296140fb565b82358281111561493857600080fd5b614944878286016147ef565b82525060208301358281111561495957600080fd5b614965878286016147ef565b60208301525095945050505050565b60008060006040848603121561498957600080fd5b833567ffffffffffffffff808211156149a157600080fd5b9085019061018082880312156149b657600080fd5b909350602085013590808211156149cc57600080fd5b818601915086601f8301126149e057600080fd5b8135818111156149ef57600080fd5b8760208260061b8501011115614a0457600080fd5b6020830194508093505050509250925092565b8381528215156020820152606060408201526000614a386060830184613fc0565b95945050505050565b60006020808385031215614a5457600080fd5b823567ffffffffffffffff811115614a6b57600080fd5b8301601f81018513614a7c57600080fd5b8035614a8a614236826141ba565b81815260069190911b82018301908381019087831115614aa957600080fd5b928401925b82841015614afb5760408489031215614ac75760008081fd5b614acf6140fb565b614ad885613f40565b8152614ae58686016143f6565b8187015282526040939093019290840190614aae565b979650505050505050565b80357fffffffff0000000000000000000000000000000000000000000000000000000081168114613f6457600080fd5b60006020808385031215614b4957600080fd5b823567ffffffffffffffff811115614b6057600080fd5b8301601f81018513614b7157600080fd5b8035614b7f614236826141ba565b8181526102409182028301840191848201919088841115614b9f57600080fd5b938501935b838510156142fa5784890381811215614bbd5760008081fd5b614bc56140fb565b614bce876143f6565b8152610220807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe084011215614c035760008081fd5b614c0b614147565b9250614c18898901614498565b83526040614c27818a01614478565b8a8501526060614c38818b01614464565b8286015260809150614c4b828b01614464565b9085015260a0614c5c8a8201614464565b8286015260c09150614c6f828b01614478565b9085015260e0614c808a8201614464565b828601526101009150614c94828b01614478565b90850152610120614ca68a8201614478565b828601526101409150614cba828b01614478565b90850152610160614ccc8a8201614464565b828601526101809150614ce0828b01614464565b908501526101a0614cf28a82016143f6565b828601526101c09150614d06828b016143f6565b908501526101e0614d188a8201614464565b828601526102009150614d2c828b01614498565b90850152614d3b898301614b06565b90840152508088019190915283529384019391850191614ba4565b60008060408385031215614d6957600080fd5b614d72836143f6565b9150602083013567ffffffffffffffff811115614d8e57600080fd5b830160a08186031215614da057600080fd5b809150509250929050565b81511515815261022081016020830151614dcb602084018261ffff169052565b506040830151614de3604084018263ffffffff169052565b506060830151614dfb606084018263ffffffff169052565b506080830151614e13608084018263ffffffff169052565b5060a0830151614e2960a084018261ffff169052565b5060c0830151614e4160c084018263ffffffff169052565b5060e0830151614e5760e084018261ffff169052565b506101008381015161ffff9081169184019190915261012080850151909116908301526101408084015163ffffffff90811691840191909152610160808501518216908401526101808085015167ffffffffffffffff908116918501919091526101a080860151909116908401526101c080850151909116908301526101e080840151151590830152610200808401517fffffffff000000000000000000000000000000000000000000000000000000008116828501525b505092915050565b60008060408385031215614f2a57600080fd5b614f3383613f40565b91506147e6602084016143f6565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8082028115828204841417610ec257610ec2614f41565b600082614fbd577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112614ff757600080fd5b83018035915067ffffffffffffffff82111561501257600080fd5b6020019150600681901b36038213156122bf57600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b80357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff81168114613f6457600080fd5b60006040828403121561509757600080fd5b61509f6140fb565b6150a883613f40565b81526150b660208401615059565b60208201529392505050565b6000604082840312156150d457600080fd5b6150dc6140fb565b6150a8836143f6565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261511a57600080fd5b83018035915067ffffffffffffffff82111561513557600080fd5b6020019150600581901b36038213156122bf57600080fd5b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8183360301811261518157600080fd5b9190910192915050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18436030181126151c057600080fd5b83018035915067ffffffffffffffff8211156151db57600080fd5b6020019150368190038213156122bf57600080fd5b80820180821115610ec257610ec2614f41565b81810381811115610ec257610ec2614f41565b7fffffffff000000000000000000000000000000000000000000000000000000008135818116916004851015614f0f5760049490940360031b84901b1690921692915050565b6000808585111561526c57600080fd5b8386111561527957600080fd5b5050820193919092039150565b60006040828403121561529857600080fd5b6152a06140fb565b8251815260208301516150b68161448a565b6000602082840312156152c457600080fd5b5051919050565b805169ffffffffffffffffffff81168114613f6457600080fd5b600080600080600060a086880312156152fd57600080fd5b615306866152cb565b9450602086015193506040860151925060608601519150615329608087016152cb565b90509295509295909350565b60006020828403121561534757600080fd5b8151610afd816141de565b60ff8181168382160190811115610ec257610ec2614f41565b60ff8281168282160390811115610ec257610ec2614f41565b600181815b808511156153dd57817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048211156153c3576153c3614f41565b808516156153d057918102915b93841c9390800290615389565b509250929050565b6000826153f457506001610ec2565b8161540157506000610ec2565b816001811461541757600281146154215761543d565b6001915050610ec2565b60ff84111561543257615432614f41565b50506001821b610ec2565b5060208310610133831016604e8410600b8410161715615460575081810a610ec2565b61546a8383615384565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0482111561549c5761549c614f41565b029392505050565b6000610afd60ff8416836153e5565b6000604082840312156154c557600080fd5b6154cd6140fb565b6154d683613f40565b8152602083013560208201528091505092915050565b63ffffffff818116838216019080821115613ea157613ea1614f41565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea164736f6c6343000818000a", } var PriceRegistryABI = PriceRegistryMetaData.ABI var PriceRegistryBin = PriceRegistryMetaData.Bin -func DeployPriceRegistry(auth *bind.TransactOpts, backend bind.ContractBackend, priceUpdaters []common.Address, feeTokens []common.Address, stalenessThreshold uint32, tokenPriceFeeds []PriceRegistryTokenPriceFeedUpdate) (common.Address, *types.Transaction, *PriceRegistry, error) { +func DeployPriceRegistry(auth *bind.TransactOpts, backend bind.ContractBackend, staticConfig PriceRegistryStaticConfig, priceUpdaters []common.Address, feeTokens []common.Address, stalenessThreshold uint32, tokenPriceFeeds []PriceRegistryTokenPriceFeedUpdate, tokenTransferFeeConfigArgs []PriceRegistryTokenTransferFeeConfigArgs, premiumMultiplierWeiPerEthArgs []PriceRegistryPremiumMultiplierWeiPerEthArgs, destChainConfigArgs []PriceRegistryDestChainDynamicConfigArgs) (common.Address, *types.Transaction, *PriceRegistry, error) { parsed, err := PriceRegistryMetaData.GetAbi() if err != nil { return common.Address{}, nil, nil, err @@ -83,7 +181,7 @@ func DeployPriceRegistry(auth *bind.TransactOpts, backend bind.ContractBackend, return common.Address{}, nil, nil, errors.New("GetABI returned nil") } - address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(PriceRegistryBin), backend, priceUpdaters, feeTokens, stalenessThreshold, tokenPriceFeeds) + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(PriceRegistryBin), backend, staticConfig, priceUpdaters, feeTokens, stalenessThreshold, tokenPriceFeeds, tokenTransferFeeConfigArgs, premiumMultiplierWeiPerEthArgs, destChainConfigArgs) if err != nil { return common.Address{}, nil, nil, err } @@ -250,6 +348,28 @@ func (_PriceRegistry *PriceRegistryCallerSession) GetAllAuthorizedCallers() ([]c return _PriceRegistry.Contract.GetAllAuthorizedCallers(&_PriceRegistry.CallOpts) } +func (_PriceRegistry *PriceRegistryCaller) GetDestChainDynamicConfig(opts *bind.CallOpts, destChainSelector uint64) (PriceRegistryDestChainDynamicConfig, error) { + var out []interface{} + err := _PriceRegistry.contract.Call(opts, &out, "getDestChainDynamicConfig", destChainSelector) + + if err != nil { + return *new(PriceRegistryDestChainDynamicConfig), err + } + + out0 := *abi.ConvertType(out[0], new(PriceRegistryDestChainDynamicConfig)).(*PriceRegistryDestChainDynamicConfig) + + return out0, err + +} + +func (_PriceRegistry *PriceRegistrySession) GetDestChainDynamicConfig(destChainSelector uint64) (PriceRegistryDestChainDynamicConfig, error) { + return _PriceRegistry.Contract.GetDestChainDynamicConfig(&_PriceRegistry.CallOpts, destChainSelector) +} + +func (_PriceRegistry *PriceRegistryCallerSession) GetDestChainDynamicConfig(destChainSelector uint64) (PriceRegistryDestChainDynamicConfig, error) { + return _PriceRegistry.Contract.GetDestChainDynamicConfig(&_PriceRegistry.CallOpts, destChainSelector) +} + func (_PriceRegistry *PriceRegistryCaller) GetDestinationChainGasPrice(opts *bind.CallOpts, destChainSelector uint64) (InternalTimestampedPackedUint224, error) { var out []interface{} err := _PriceRegistry.contract.Call(opts, &out, "getDestinationChainGasPrice", destChainSelector) @@ -294,6 +414,28 @@ func (_PriceRegistry *PriceRegistryCallerSession) GetFeeTokens() ([]common.Addre return _PriceRegistry.Contract.GetFeeTokens(&_PriceRegistry.CallOpts) } +func (_PriceRegistry *PriceRegistryCaller) GetPremiumMultiplierWeiPerEth(opts *bind.CallOpts, token common.Address) (uint64, error) { + var out []interface{} + err := _PriceRegistry.contract.Call(opts, &out, "getPremiumMultiplierWeiPerEth", token) + + if err != nil { + return *new(uint64), err + } + + out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) + + return out0, err + +} + +func (_PriceRegistry *PriceRegistrySession) GetPremiumMultiplierWeiPerEth(token common.Address) (uint64, error) { + return _PriceRegistry.Contract.GetPremiumMultiplierWeiPerEth(&_PriceRegistry.CallOpts, token) +} + +func (_PriceRegistry *PriceRegistryCallerSession) GetPremiumMultiplierWeiPerEth(token common.Address) (uint64, error) { + return _PriceRegistry.Contract.GetPremiumMultiplierWeiPerEth(&_PriceRegistry.CallOpts, token) +} + func (_PriceRegistry *PriceRegistryCaller) GetStalenessThreshold(opts *bind.CallOpts) (*big.Int, error) { var out []interface{} err := _PriceRegistry.contract.Call(opts, &out, "getStalenessThreshold") @@ -316,6 +458,28 @@ func (_PriceRegistry *PriceRegistryCallerSession) GetStalenessThreshold() (*big. return _PriceRegistry.Contract.GetStalenessThreshold(&_PriceRegistry.CallOpts) } +func (_PriceRegistry *PriceRegistryCaller) GetStaticConfig(opts *bind.CallOpts) (PriceRegistryStaticConfig, error) { + var out []interface{} + err := _PriceRegistry.contract.Call(opts, &out, "getStaticConfig") + + if err != nil { + return *new(PriceRegistryStaticConfig), err + } + + out0 := *abi.ConvertType(out[0], new(PriceRegistryStaticConfig)).(*PriceRegistryStaticConfig) + + return out0, err + +} + +func (_PriceRegistry *PriceRegistrySession) GetStaticConfig() (PriceRegistryStaticConfig, error) { + return _PriceRegistry.Contract.GetStaticConfig(&_PriceRegistry.CallOpts) +} + +func (_PriceRegistry *PriceRegistryCallerSession) GetStaticConfig() (PriceRegistryStaticConfig, error) { + return _PriceRegistry.Contract.GetStaticConfig(&_PriceRegistry.CallOpts) +} + func (_PriceRegistry *PriceRegistryCaller) GetTokenAndGasPrices(opts *bind.CallOpts, token common.Address, destChainSelector uint64) (GetTokenAndGasPrices, error) { @@ -412,6 +576,81 @@ func (_PriceRegistry *PriceRegistryCallerSession) GetTokenPrices(tokens []common return _PriceRegistry.Contract.GetTokenPrices(&_PriceRegistry.CallOpts, tokens) } +func (_PriceRegistry *PriceRegistryCaller) GetTokenTransferFeeConfig(opts *bind.CallOpts, destChainSelector uint64, token common.Address) (PriceRegistryTokenTransferFeeConfig, error) { + var out []interface{} + err := _PriceRegistry.contract.Call(opts, &out, "getTokenTransferFeeConfig", destChainSelector, token) + + if err != nil { + return *new(PriceRegistryTokenTransferFeeConfig), err + } + + out0 := *abi.ConvertType(out[0], new(PriceRegistryTokenTransferFeeConfig)).(*PriceRegistryTokenTransferFeeConfig) + + return out0, err + +} + +func (_PriceRegistry *PriceRegistrySession) GetTokenTransferFeeConfig(destChainSelector uint64, token common.Address) (PriceRegistryTokenTransferFeeConfig, error) { + return _PriceRegistry.Contract.GetTokenTransferFeeConfig(&_PriceRegistry.CallOpts, destChainSelector, token) +} + +func (_PriceRegistry *PriceRegistryCallerSession) GetTokenTransferFeeConfig(destChainSelector uint64, token common.Address) (PriceRegistryTokenTransferFeeConfig, error) { + return _PriceRegistry.Contract.GetTokenTransferFeeConfig(&_PriceRegistry.CallOpts, destChainSelector, token) +} + +func (_PriceRegistry *PriceRegistryCaller) GetValidatedFee(opts *bind.CallOpts, destChainSelector uint64, message ClientEVM2AnyMessage) (*big.Int, error) { + var out []interface{} + err := _PriceRegistry.contract.Call(opts, &out, "getValidatedFee", destChainSelector, message) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +func (_PriceRegistry *PriceRegistrySession) GetValidatedFee(destChainSelector uint64, message ClientEVM2AnyMessage) (*big.Int, error) { + return _PriceRegistry.Contract.GetValidatedFee(&_PriceRegistry.CallOpts, destChainSelector, message) +} + +func (_PriceRegistry *PriceRegistryCallerSession) GetValidatedFee(destChainSelector uint64, message ClientEVM2AnyMessage) (*big.Int, error) { + return _PriceRegistry.Contract.GetValidatedFee(&_PriceRegistry.CallOpts, destChainSelector, message) +} + +func (_PriceRegistry *PriceRegistryCaller) GetValidatedRampMessageParams(opts *bind.CallOpts, message InternalEVM2AnyRampMessage, sourceTokenAmounts []ClientEVMTokenAmount) (GetValidatedRampMessageParams, + + error) { + var out []interface{} + err := _PriceRegistry.contract.Call(opts, &out, "getValidatedRampMessageParams", message, sourceTokenAmounts) + + outstruct := new(GetValidatedRampMessageParams) + if err != nil { + return *outstruct, err + } + + outstruct.MsgFeeJuels = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + outstruct.IsOutOfOrderExecution = *abi.ConvertType(out[1], new(bool)).(*bool) + outstruct.ConvertedExtraArgs = *abi.ConvertType(out[2], new([]byte)).(*[]byte) + + return *outstruct, err + +} + +func (_PriceRegistry *PriceRegistrySession) GetValidatedRampMessageParams(message InternalEVM2AnyRampMessage, sourceTokenAmounts []ClientEVMTokenAmount) (GetValidatedRampMessageParams, + + error) { + return _PriceRegistry.Contract.GetValidatedRampMessageParams(&_PriceRegistry.CallOpts, message, sourceTokenAmounts) +} + +func (_PriceRegistry *PriceRegistryCallerSession) GetValidatedRampMessageParams(message InternalEVM2AnyRampMessage, sourceTokenAmounts []ClientEVMTokenAmount) (GetValidatedRampMessageParams, + + error) { + return _PriceRegistry.Contract.GetValidatedRampMessageParams(&_PriceRegistry.CallOpts, message, sourceTokenAmounts) +} + func (_PriceRegistry *PriceRegistryCaller) GetValidatedTokenPrice(opts *bind.CallOpts, token common.Address) (*big.Int, error) { var out []interface{} err := _PriceRegistry.contract.Call(opts, &out, "getValidatedTokenPrice", token) @@ -502,6 +741,18 @@ func (_PriceRegistry *PriceRegistryTransactorSession) ApplyAuthorizedCallerUpdat return _PriceRegistry.Contract.ApplyAuthorizedCallerUpdates(&_PriceRegistry.TransactOpts, authorizedCallerArgs) } +func (_PriceRegistry *PriceRegistryTransactor) ApplyDestChainConfigUpdates(opts *bind.TransactOpts, destChainConfigArgs []PriceRegistryDestChainDynamicConfigArgs) (*types.Transaction, error) { + return _PriceRegistry.contract.Transact(opts, "applyDestChainConfigUpdates", destChainConfigArgs) +} + +func (_PriceRegistry *PriceRegistrySession) ApplyDestChainConfigUpdates(destChainConfigArgs []PriceRegistryDestChainDynamicConfigArgs) (*types.Transaction, error) { + return _PriceRegistry.Contract.ApplyDestChainConfigUpdates(&_PriceRegistry.TransactOpts, destChainConfigArgs) +} + +func (_PriceRegistry *PriceRegistryTransactorSession) ApplyDestChainConfigUpdates(destChainConfigArgs []PriceRegistryDestChainDynamicConfigArgs) (*types.Transaction, error) { + return _PriceRegistry.Contract.ApplyDestChainConfigUpdates(&_PriceRegistry.TransactOpts, destChainConfigArgs) +} + func (_PriceRegistry *PriceRegistryTransactor) ApplyFeeTokensUpdates(opts *bind.TransactOpts, feeTokensToAdd []common.Address, feeTokensToRemove []common.Address) (*types.Transaction, error) { return _PriceRegistry.contract.Transact(opts, "applyFeeTokensUpdates", feeTokensToAdd, feeTokensToRemove) } @@ -514,6 +765,30 @@ func (_PriceRegistry *PriceRegistryTransactorSession) ApplyFeeTokensUpdates(feeT return _PriceRegistry.Contract.ApplyFeeTokensUpdates(&_PriceRegistry.TransactOpts, feeTokensToAdd, feeTokensToRemove) } +func (_PriceRegistry *PriceRegistryTransactor) ApplyPremiumMultiplierWeiPerEthUpdates(opts *bind.TransactOpts, premiumMultiplierWeiPerEthArgs []PriceRegistryPremiumMultiplierWeiPerEthArgs) (*types.Transaction, error) { + return _PriceRegistry.contract.Transact(opts, "applyPremiumMultiplierWeiPerEthUpdates", premiumMultiplierWeiPerEthArgs) +} + +func (_PriceRegistry *PriceRegistrySession) ApplyPremiumMultiplierWeiPerEthUpdates(premiumMultiplierWeiPerEthArgs []PriceRegistryPremiumMultiplierWeiPerEthArgs) (*types.Transaction, error) { + return _PriceRegistry.Contract.ApplyPremiumMultiplierWeiPerEthUpdates(&_PriceRegistry.TransactOpts, premiumMultiplierWeiPerEthArgs) +} + +func (_PriceRegistry *PriceRegistryTransactorSession) ApplyPremiumMultiplierWeiPerEthUpdates(premiumMultiplierWeiPerEthArgs []PriceRegistryPremiumMultiplierWeiPerEthArgs) (*types.Transaction, error) { + return _PriceRegistry.Contract.ApplyPremiumMultiplierWeiPerEthUpdates(&_PriceRegistry.TransactOpts, premiumMultiplierWeiPerEthArgs) +} + +func (_PriceRegistry *PriceRegistryTransactor) ApplyTokenTransferFeeConfigUpdates(opts *bind.TransactOpts, tokenTransferFeeConfigArgs []PriceRegistryTokenTransferFeeConfigArgs, tokensToUseDefaultFeeConfigs []PriceRegistryTokenTransferFeeConfigRemoveArgs) (*types.Transaction, error) { + return _PriceRegistry.contract.Transact(opts, "applyTokenTransferFeeConfigUpdates", tokenTransferFeeConfigArgs, tokensToUseDefaultFeeConfigs) +} + +func (_PriceRegistry *PriceRegistrySession) ApplyTokenTransferFeeConfigUpdates(tokenTransferFeeConfigArgs []PriceRegistryTokenTransferFeeConfigArgs, tokensToUseDefaultFeeConfigs []PriceRegistryTokenTransferFeeConfigRemoveArgs) (*types.Transaction, error) { + return _PriceRegistry.Contract.ApplyTokenTransferFeeConfigUpdates(&_PriceRegistry.TransactOpts, tokenTransferFeeConfigArgs, tokensToUseDefaultFeeConfigs) +} + +func (_PriceRegistry *PriceRegistryTransactorSession) ApplyTokenTransferFeeConfigUpdates(tokenTransferFeeConfigArgs []PriceRegistryTokenTransferFeeConfigArgs, tokensToUseDefaultFeeConfigs []PriceRegistryTokenTransferFeeConfigRemoveArgs) (*types.Transaction, error) { + return _PriceRegistry.Contract.ApplyTokenTransferFeeConfigUpdates(&_PriceRegistry.TransactOpts, tokenTransferFeeConfigArgs, tokensToUseDefaultFeeConfigs) +} + func (_PriceRegistry *PriceRegistryTransactor) TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) { return _PriceRegistry.contract.Transact(opts, "transferOwnership", to) } @@ -784,8 +1059,8 @@ func (_PriceRegistry *PriceRegistryFilterer) ParseAuthorizedCallerRemoved(log ty return event, nil } -type PriceRegistryFeeTokenAddedIterator struct { - Event *PriceRegistryFeeTokenAdded +type PriceRegistryDestChainAddedIterator struct { + Event *PriceRegistryDestChainAdded contract *bind.BoundContract event string @@ -796,7 +1071,7 @@ type PriceRegistryFeeTokenAddedIterator struct { fail error } -func (it *PriceRegistryFeeTokenAddedIterator) Next() bool { +func (it *PriceRegistryDestChainAddedIterator) Next() bool { if it.fail != nil { return false @@ -805,7 +1080,7 @@ func (it *PriceRegistryFeeTokenAddedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(PriceRegistryFeeTokenAdded) + it.Event = new(PriceRegistryDestChainAdded) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -820,7 +1095,7 @@ func (it *PriceRegistryFeeTokenAddedIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(PriceRegistryFeeTokenAdded) + it.Event = new(PriceRegistryDestChainAdded) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -835,42 +1110,43 @@ func (it *PriceRegistryFeeTokenAddedIterator) Next() bool { } } -func (it *PriceRegistryFeeTokenAddedIterator) Error() error { +func (it *PriceRegistryDestChainAddedIterator) Error() error { return it.fail } -func (it *PriceRegistryFeeTokenAddedIterator) Close() error { +func (it *PriceRegistryDestChainAddedIterator) Close() error { it.sub.Unsubscribe() return nil } -type PriceRegistryFeeTokenAdded struct { - FeeToken common.Address - Raw types.Log +type PriceRegistryDestChainAdded struct { + DestChainSelector uint64 + DynamicConfig PriceRegistryDestChainDynamicConfig + Raw types.Log } -func (_PriceRegistry *PriceRegistryFilterer) FilterFeeTokenAdded(opts *bind.FilterOpts, feeToken []common.Address) (*PriceRegistryFeeTokenAddedIterator, error) { +func (_PriceRegistry *PriceRegistryFilterer) FilterDestChainAdded(opts *bind.FilterOpts, destChainSelector []uint64) (*PriceRegistryDestChainAddedIterator, error) { - var feeTokenRule []interface{} - for _, feeTokenItem := range feeToken { - feeTokenRule = append(feeTokenRule, feeTokenItem) + var destChainSelectorRule []interface{} + for _, destChainSelectorItem := range destChainSelector { + destChainSelectorRule = append(destChainSelectorRule, destChainSelectorItem) } - logs, sub, err := _PriceRegistry.contract.FilterLogs(opts, "FeeTokenAdded", feeTokenRule) + logs, sub, err := _PriceRegistry.contract.FilterLogs(opts, "DestChainAdded", destChainSelectorRule) if err != nil { return nil, err } - return &PriceRegistryFeeTokenAddedIterator{contract: _PriceRegistry.contract, event: "FeeTokenAdded", logs: logs, sub: sub}, nil + return &PriceRegistryDestChainAddedIterator{contract: _PriceRegistry.contract, event: "DestChainAdded", logs: logs, sub: sub}, nil } -func (_PriceRegistry *PriceRegistryFilterer) WatchFeeTokenAdded(opts *bind.WatchOpts, sink chan<- *PriceRegistryFeeTokenAdded, feeToken []common.Address) (event.Subscription, error) { +func (_PriceRegistry *PriceRegistryFilterer) WatchDestChainAdded(opts *bind.WatchOpts, sink chan<- *PriceRegistryDestChainAdded, destChainSelector []uint64) (event.Subscription, error) { - var feeTokenRule []interface{} - for _, feeTokenItem := range feeToken { - feeTokenRule = append(feeTokenRule, feeTokenItem) + var destChainSelectorRule []interface{} + for _, destChainSelectorItem := range destChainSelector { + destChainSelectorRule = append(destChainSelectorRule, destChainSelectorItem) } - logs, sub, err := _PriceRegistry.contract.WatchLogs(opts, "FeeTokenAdded", feeTokenRule) + logs, sub, err := _PriceRegistry.contract.WatchLogs(opts, "DestChainAdded", destChainSelectorRule) if err != nil { return nil, err } @@ -880,8 +1156,8 @@ func (_PriceRegistry *PriceRegistryFilterer) WatchFeeTokenAdded(opts *bind.Watch select { case log := <-logs: - event := new(PriceRegistryFeeTokenAdded) - if err := _PriceRegistry.contract.UnpackLog(event, "FeeTokenAdded", log); err != nil { + event := new(PriceRegistryDestChainAdded) + if err := _PriceRegistry.contract.UnpackLog(event, "DestChainAdded", log); err != nil { return err } event.Raw = log @@ -902,17 +1178,17 @@ func (_PriceRegistry *PriceRegistryFilterer) WatchFeeTokenAdded(opts *bind.Watch }), nil } -func (_PriceRegistry *PriceRegistryFilterer) ParseFeeTokenAdded(log types.Log) (*PriceRegistryFeeTokenAdded, error) { - event := new(PriceRegistryFeeTokenAdded) - if err := _PriceRegistry.contract.UnpackLog(event, "FeeTokenAdded", log); err != nil { +func (_PriceRegistry *PriceRegistryFilterer) ParseDestChainAdded(log types.Log) (*PriceRegistryDestChainAdded, error) { + event := new(PriceRegistryDestChainAdded) + if err := _PriceRegistry.contract.UnpackLog(event, "DestChainAdded", log); err != nil { return nil, err } event.Raw = log return event, nil } -type PriceRegistryFeeTokenRemovedIterator struct { - Event *PriceRegistryFeeTokenRemoved +type PriceRegistryDestChainDynamicConfigUpdatedIterator struct { + Event *PriceRegistryDestChainDynamicConfigUpdated contract *bind.BoundContract event string @@ -923,7 +1199,7 @@ type PriceRegistryFeeTokenRemovedIterator struct { fail error } -func (it *PriceRegistryFeeTokenRemovedIterator) Next() bool { +func (it *PriceRegistryDestChainDynamicConfigUpdatedIterator) Next() bool { if it.fail != nil { return false @@ -932,7 +1208,7 @@ func (it *PriceRegistryFeeTokenRemovedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(PriceRegistryFeeTokenRemoved) + it.Event = new(PriceRegistryDestChainDynamicConfigUpdated) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -947,7 +1223,7 @@ func (it *PriceRegistryFeeTokenRemovedIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(PriceRegistryFeeTokenRemoved) + it.Event = new(PriceRegistryDestChainDynamicConfigUpdated) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -962,42 +1238,43 @@ func (it *PriceRegistryFeeTokenRemovedIterator) Next() bool { } } -func (it *PriceRegistryFeeTokenRemovedIterator) Error() error { +func (it *PriceRegistryDestChainDynamicConfigUpdatedIterator) Error() error { return it.fail } -func (it *PriceRegistryFeeTokenRemovedIterator) Close() error { +func (it *PriceRegistryDestChainDynamicConfigUpdatedIterator) Close() error { it.sub.Unsubscribe() return nil } -type PriceRegistryFeeTokenRemoved struct { - FeeToken common.Address - Raw types.Log +type PriceRegistryDestChainDynamicConfigUpdated struct { + DestChainSelector uint64 + DynamicConfig PriceRegistryDestChainDynamicConfig + Raw types.Log } -func (_PriceRegistry *PriceRegistryFilterer) FilterFeeTokenRemoved(opts *bind.FilterOpts, feeToken []common.Address) (*PriceRegistryFeeTokenRemovedIterator, error) { +func (_PriceRegistry *PriceRegistryFilterer) FilterDestChainDynamicConfigUpdated(opts *bind.FilterOpts, destChainSelector []uint64) (*PriceRegistryDestChainDynamicConfigUpdatedIterator, error) { - var feeTokenRule []interface{} - for _, feeTokenItem := range feeToken { - feeTokenRule = append(feeTokenRule, feeTokenItem) + var destChainSelectorRule []interface{} + for _, destChainSelectorItem := range destChainSelector { + destChainSelectorRule = append(destChainSelectorRule, destChainSelectorItem) } - logs, sub, err := _PriceRegistry.contract.FilterLogs(opts, "FeeTokenRemoved", feeTokenRule) + logs, sub, err := _PriceRegistry.contract.FilterLogs(opts, "DestChainDynamicConfigUpdated", destChainSelectorRule) if err != nil { return nil, err } - return &PriceRegistryFeeTokenRemovedIterator{contract: _PriceRegistry.contract, event: "FeeTokenRemoved", logs: logs, sub: sub}, nil + return &PriceRegistryDestChainDynamicConfigUpdatedIterator{contract: _PriceRegistry.contract, event: "DestChainDynamicConfigUpdated", logs: logs, sub: sub}, nil } -func (_PriceRegistry *PriceRegistryFilterer) WatchFeeTokenRemoved(opts *bind.WatchOpts, sink chan<- *PriceRegistryFeeTokenRemoved, feeToken []common.Address) (event.Subscription, error) { +func (_PriceRegistry *PriceRegistryFilterer) WatchDestChainDynamicConfigUpdated(opts *bind.WatchOpts, sink chan<- *PriceRegistryDestChainDynamicConfigUpdated, destChainSelector []uint64) (event.Subscription, error) { - var feeTokenRule []interface{} - for _, feeTokenItem := range feeToken { - feeTokenRule = append(feeTokenRule, feeTokenItem) + var destChainSelectorRule []interface{} + for _, destChainSelectorItem := range destChainSelector { + destChainSelectorRule = append(destChainSelectorRule, destChainSelectorItem) } - logs, sub, err := _PriceRegistry.contract.WatchLogs(opts, "FeeTokenRemoved", feeTokenRule) + logs, sub, err := _PriceRegistry.contract.WatchLogs(opts, "DestChainDynamicConfigUpdated", destChainSelectorRule) if err != nil { return nil, err } @@ -1007,8 +1284,8 @@ func (_PriceRegistry *PriceRegistryFilterer) WatchFeeTokenRemoved(opts *bind.Wat select { case log := <-logs: - event := new(PriceRegistryFeeTokenRemoved) - if err := _PriceRegistry.contract.UnpackLog(event, "FeeTokenRemoved", log); err != nil { + event := new(PriceRegistryDestChainDynamicConfigUpdated) + if err := _PriceRegistry.contract.UnpackLog(event, "DestChainDynamicConfigUpdated", log); err != nil { return err } event.Raw = log @@ -1029,17 +1306,17 @@ func (_PriceRegistry *PriceRegistryFilterer) WatchFeeTokenRemoved(opts *bind.Wat }), nil } -func (_PriceRegistry *PriceRegistryFilterer) ParseFeeTokenRemoved(log types.Log) (*PriceRegistryFeeTokenRemoved, error) { - event := new(PriceRegistryFeeTokenRemoved) - if err := _PriceRegistry.contract.UnpackLog(event, "FeeTokenRemoved", log); err != nil { +func (_PriceRegistry *PriceRegistryFilterer) ParseDestChainDynamicConfigUpdated(log types.Log) (*PriceRegistryDestChainDynamicConfigUpdated, error) { + event := new(PriceRegistryDestChainDynamicConfigUpdated) + if err := _PriceRegistry.contract.UnpackLog(event, "DestChainDynamicConfigUpdated", log); err != nil { return nil, err } event.Raw = log return event, nil } -type PriceRegistryOwnershipTransferRequestedIterator struct { - Event *PriceRegistryOwnershipTransferRequested +type PriceRegistryFeeTokenAddedIterator struct { + Event *PriceRegistryFeeTokenAdded contract *bind.BoundContract event string @@ -1050,7 +1327,7 @@ type PriceRegistryOwnershipTransferRequestedIterator struct { fail error } -func (it *PriceRegistryOwnershipTransferRequestedIterator) Next() bool { +func (it *PriceRegistryFeeTokenAddedIterator) Next() bool { if it.fail != nil { return false @@ -1059,7 +1336,7 @@ func (it *PriceRegistryOwnershipTransferRequestedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(PriceRegistryOwnershipTransferRequested) + it.Event = new(PriceRegistryFeeTokenAdded) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1074,7 +1351,7 @@ func (it *PriceRegistryOwnershipTransferRequestedIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(PriceRegistryOwnershipTransferRequested) + it.Event = new(PriceRegistryFeeTokenAdded) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1089,51 +1366,42 @@ func (it *PriceRegistryOwnershipTransferRequestedIterator) Next() bool { } } -func (it *PriceRegistryOwnershipTransferRequestedIterator) Error() error { +func (it *PriceRegistryFeeTokenAddedIterator) Error() error { return it.fail } -func (it *PriceRegistryOwnershipTransferRequestedIterator) Close() error { +func (it *PriceRegistryFeeTokenAddedIterator) Close() error { it.sub.Unsubscribe() return nil } -type PriceRegistryOwnershipTransferRequested struct { - From common.Address - To common.Address - Raw types.Log +type PriceRegistryFeeTokenAdded struct { + FeeToken common.Address + Raw types.Log } -func (_PriceRegistry *PriceRegistryFilterer) FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*PriceRegistryOwnershipTransferRequestedIterator, error) { +func (_PriceRegistry *PriceRegistryFilterer) FilterFeeTokenAdded(opts *bind.FilterOpts, feeToken []common.Address) (*PriceRegistryFeeTokenAddedIterator, error) { - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) + var feeTokenRule []interface{} + for _, feeTokenItem := range feeToken { + feeTokenRule = append(feeTokenRule, feeTokenItem) } - logs, sub, err := _PriceRegistry.contract.FilterLogs(opts, "OwnershipTransferRequested", fromRule, toRule) + logs, sub, err := _PriceRegistry.contract.FilterLogs(opts, "FeeTokenAdded", feeTokenRule) if err != nil { return nil, err } - return &PriceRegistryOwnershipTransferRequestedIterator{contract: _PriceRegistry.contract, event: "OwnershipTransferRequested", logs: logs, sub: sub}, nil + return &PriceRegistryFeeTokenAddedIterator{contract: _PriceRegistry.contract, event: "FeeTokenAdded", logs: logs, sub: sub}, nil } -func (_PriceRegistry *PriceRegistryFilterer) WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *PriceRegistryOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) { +func (_PriceRegistry *PriceRegistryFilterer) WatchFeeTokenAdded(opts *bind.WatchOpts, sink chan<- *PriceRegistryFeeTokenAdded, feeToken []common.Address) (event.Subscription, error) { - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) + var feeTokenRule []interface{} + for _, feeTokenItem := range feeToken { + feeTokenRule = append(feeTokenRule, feeTokenItem) } - logs, sub, err := _PriceRegistry.contract.WatchLogs(opts, "OwnershipTransferRequested", fromRule, toRule) + logs, sub, err := _PriceRegistry.contract.WatchLogs(opts, "FeeTokenAdded", feeTokenRule) if err != nil { return nil, err } @@ -1143,8 +1411,8 @@ func (_PriceRegistry *PriceRegistryFilterer) WatchOwnershipTransferRequested(opt select { case log := <-logs: - event := new(PriceRegistryOwnershipTransferRequested) - if err := _PriceRegistry.contract.UnpackLog(event, "OwnershipTransferRequested", log); err != nil { + event := new(PriceRegistryFeeTokenAdded) + if err := _PriceRegistry.contract.UnpackLog(event, "FeeTokenAdded", log); err != nil { return err } event.Raw = log @@ -1165,17 +1433,280 @@ func (_PriceRegistry *PriceRegistryFilterer) WatchOwnershipTransferRequested(opt }), nil } -func (_PriceRegistry *PriceRegistryFilterer) ParseOwnershipTransferRequested(log types.Log) (*PriceRegistryOwnershipTransferRequested, error) { - event := new(PriceRegistryOwnershipTransferRequested) - if err := _PriceRegistry.contract.UnpackLog(event, "OwnershipTransferRequested", log); err != nil { +func (_PriceRegistry *PriceRegistryFilterer) ParseFeeTokenAdded(log types.Log) (*PriceRegistryFeeTokenAdded, error) { + event := new(PriceRegistryFeeTokenAdded) + if err := _PriceRegistry.contract.UnpackLog(event, "FeeTokenAdded", log); err != nil { return nil, err } event.Raw = log return event, nil } -type PriceRegistryOwnershipTransferredIterator struct { - Event *PriceRegistryOwnershipTransferred +type PriceRegistryFeeTokenRemovedIterator struct { + Event *PriceRegistryFeeTokenRemoved + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *PriceRegistryFeeTokenRemovedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(PriceRegistryFeeTokenRemoved) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(PriceRegistryFeeTokenRemoved) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *PriceRegistryFeeTokenRemovedIterator) Error() error { + return it.fail +} + +func (it *PriceRegistryFeeTokenRemovedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type PriceRegistryFeeTokenRemoved struct { + FeeToken common.Address + Raw types.Log +} + +func (_PriceRegistry *PriceRegistryFilterer) FilterFeeTokenRemoved(opts *bind.FilterOpts, feeToken []common.Address) (*PriceRegistryFeeTokenRemovedIterator, error) { + + var feeTokenRule []interface{} + for _, feeTokenItem := range feeToken { + feeTokenRule = append(feeTokenRule, feeTokenItem) + } + + logs, sub, err := _PriceRegistry.contract.FilterLogs(opts, "FeeTokenRemoved", feeTokenRule) + if err != nil { + return nil, err + } + return &PriceRegistryFeeTokenRemovedIterator{contract: _PriceRegistry.contract, event: "FeeTokenRemoved", logs: logs, sub: sub}, nil +} + +func (_PriceRegistry *PriceRegistryFilterer) WatchFeeTokenRemoved(opts *bind.WatchOpts, sink chan<- *PriceRegistryFeeTokenRemoved, feeToken []common.Address) (event.Subscription, error) { + + var feeTokenRule []interface{} + for _, feeTokenItem := range feeToken { + feeTokenRule = append(feeTokenRule, feeTokenItem) + } + + logs, sub, err := _PriceRegistry.contract.WatchLogs(opts, "FeeTokenRemoved", feeTokenRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(PriceRegistryFeeTokenRemoved) + if err := _PriceRegistry.contract.UnpackLog(event, "FeeTokenRemoved", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_PriceRegistry *PriceRegistryFilterer) ParseFeeTokenRemoved(log types.Log) (*PriceRegistryFeeTokenRemoved, error) { + event := new(PriceRegistryFeeTokenRemoved) + if err := _PriceRegistry.contract.UnpackLog(event, "FeeTokenRemoved", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type PriceRegistryOwnershipTransferRequestedIterator struct { + Event *PriceRegistryOwnershipTransferRequested + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *PriceRegistryOwnershipTransferRequestedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(PriceRegistryOwnershipTransferRequested) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(PriceRegistryOwnershipTransferRequested) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *PriceRegistryOwnershipTransferRequestedIterator) Error() error { + return it.fail +} + +func (it *PriceRegistryOwnershipTransferRequestedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type PriceRegistryOwnershipTransferRequested struct { + From common.Address + To common.Address + Raw types.Log +} + +func (_PriceRegistry *PriceRegistryFilterer) FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*PriceRegistryOwnershipTransferRequestedIterator, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _PriceRegistry.contract.FilterLogs(opts, "OwnershipTransferRequested", fromRule, toRule) + if err != nil { + return nil, err + } + return &PriceRegistryOwnershipTransferRequestedIterator{contract: _PriceRegistry.contract, event: "OwnershipTransferRequested", logs: logs, sub: sub}, nil +} + +func (_PriceRegistry *PriceRegistryFilterer) WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *PriceRegistryOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _PriceRegistry.contract.WatchLogs(opts, "OwnershipTransferRequested", fromRule, toRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(PriceRegistryOwnershipTransferRequested) + if err := _PriceRegistry.contract.UnpackLog(event, "OwnershipTransferRequested", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_PriceRegistry *PriceRegistryFilterer) ParseOwnershipTransferRequested(log types.Log) (*PriceRegistryOwnershipTransferRequested, error) { + event := new(PriceRegistryOwnershipTransferRequested) + if err := _PriceRegistry.contract.UnpackLog(event, "OwnershipTransferRequested", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type PriceRegistryOwnershipTransferredIterator struct { + Event *PriceRegistryOwnershipTransferred contract *bind.BoundContract event string @@ -1195,7 +1726,399 @@ func (it *PriceRegistryOwnershipTransferredIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(PriceRegistryOwnershipTransferred) + it.Event = new(PriceRegistryOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(PriceRegistryOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *PriceRegistryOwnershipTransferredIterator) Error() error { + return it.fail +} + +func (it *PriceRegistryOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type PriceRegistryOwnershipTransferred struct { + From common.Address + To common.Address + Raw types.Log +} + +func (_PriceRegistry *PriceRegistryFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*PriceRegistryOwnershipTransferredIterator, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _PriceRegistry.contract.FilterLogs(opts, "OwnershipTransferred", fromRule, toRule) + if err != nil { + return nil, err + } + return &PriceRegistryOwnershipTransferredIterator{contract: _PriceRegistry.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +} + +func (_PriceRegistry *PriceRegistryFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *PriceRegistryOwnershipTransferred, from []common.Address, to []common.Address) (event.Subscription, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _PriceRegistry.contract.WatchLogs(opts, "OwnershipTransferred", fromRule, toRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(PriceRegistryOwnershipTransferred) + if err := _PriceRegistry.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_PriceRegistry *PriceRegistryFilterer) ParseOwnershipTransferred(log types.Log) (*PriceRegistryOwnershipTransferred, error) { + event := new(PriceRegistryOwnershipTransferred) + if err := _PriceRegistry.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type PriceRegistryPremiumMultiplierWeiPerEthUpdatedIterator struct { + Event *PriceRegistryPremiumMultiplierWeiPerEthUpdated + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *PriceRegistryPremiumMultiplierWeiPerEthUpdatedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(PriceRegistryPremiumMultiplierWeiPerEthUpdated) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(PriceRegistryPremiumMultiplierWeiPerEthUpdated) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *PriceRegistryPremiumMultiplierWeiPerEthUpdatedIterator) Error() error { + return it.fail +} + +func (it *PriceRegistryPremiumMultiplierWeiPerEthUpdatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type PriceRegistryPremiumMultiplierWeiPerEthUpdated struct { + Token common.Address + PremiumMultiplierWeiPerEth uint64 + Raw types.Log +} + +func (_PriceRegistry *PriceRegistryFilterer) FilterPremiumMultiplierWeiPerEthUpdated(opts *bind.FilterOpts, token []common.Address) (*PriceRegistryPremiumMultiplierWeiPerEthUpdatedIterator, error) { + + var tokenRule []interface{} + for _, tokenItem := range token { + tokenRule = append(tokenRule, tokenItem) + } + + logs, sub, err := _PriceRegistry.contract.FilterLogs(opts, "PremiumMultiplierWeiPerEthUpdated", tokenRule) + if err != nil { + return nil, err + } + return &PriceRegistryPremiumMultiplierWeiPerEthUpdatedIterator{contract: _PriceRegistry.contract, event: "PremiumMultiplierWeiPerEthUpdated", logs: logs, sub: sub}, nil +} + +func (_PriceRegistry *PriceRegistryFilterer) WatchPremiumMultiplierWeiPerEthUpdated(opts *bind.WatchOpts, sink chan<- *PriceRegistryPremiumMultiplierWeiPerEthUpdated, token []common.Address) (event.Subscription, error) { + + var tokenRule []interface{} + for _, tokenItem := range token { + tokenRule = append(tokenRule, tokenItem) + } + + logs, sub, err := _PriceRegistry.contract.WatchLogs(opts, "PremiumMultiplierWeiPerEthUpdated", tokenRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(PriceRegistryPremiumMultiplierWeiPerEthUpdated) + if err := _PriceRegistry.contract.UnpackLog(event, "PremiumMultiplierWeiPerEthUpdated", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_PriceRegistry *PriceRegistryFilterer) ParsePremiumMultiplierWeiPerEthUpdated(log types.Log) (*PriceRegistryPremiumMultiplierWeiPerEthUpdated, error) { + event := new(PriceRegistryPremiumMultiplierWeiPerEthUpdated) + if err := _PriceRegistry.contract.UnpackLog(event, "PremiumMultiplierWeiPerEthUpdated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type PriceRegistryPriceFeedPerTokenUpdatedIterator struct { + Event *PriceRegistryPriceFeedPerTokenUpdated + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *PriceRegistryPriceFeedPerTokenUpdatedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(PriceRegistryPriceFeedPerTokenUpdated) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(PriceRegistryPriceFeedPerTokenUpdated) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *PriceRegistryPriceFeedPerTokenUpdatedIterator) Error() error { + return it.fail +} + +func (it *PriceRegistryPriceFeedPerTokenUpdatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type PriceRegistryPriceFeedPerTokenUpdated struct { + Token common.Address + PriceFeedConfig IPriceRegistryTokenPriceFeedConfig + Raw types.Log +} + +func (_PriceRegistry *PriceRegistryFilterer) FilterPriceFeedPerTokenUpdated(opts *bind.FilterOpts, token []common.Address) (*PriceRegistryPriceFeedPerTokenUpdatedIterator, error) { + + var tokenRule []interface{} + for _, tokenItem := range token { + tokenRule = append(tokenRule, tokenItem) + } + + logs, sub, err := _PriceRegistry.contract.FilterLogs(opts, "PriceFeedPerTokenUpdated", tokenRule) + if err != nil { + return nil, err + } + return &PriceRegistryPriceFeedPerTokenUpdatedIterator{contract: _PriceRegistry.contract, event: "PriceFeedPerTokenUpdated", logs: logs, sub: sub}, nil +} + +func (_PriceRegistry *PriceRegistryFilterer) WatchPriceFeedPerTokenUpdated(opts *bind.WatchOpts, sink chan<- *PriceRegistryPriceFeedPerTokenUpdated, token []common.Address) (event.Subscription, error) { + + var tokenRule []interface{} + for _, tokenItem := range token { + tokenRule = append(tokenRule, tokenItem) + } + + logs, sub, err := _PriceRegistry.contract.WatchLogs(opts, "PriceFeedPerTokenUpdated", tokenRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(PriceRegistryPriceFeedPerTokenUpdated) + if err := _PriceRegistry.contract.UnpackLog(event, "PriceFeedPerTokenUpdated", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_PriceRegistry *PriceRegistryFilterer) ParsePriceFeedPerTokenUpdated(log types.Log) (*PriceRegistryPriceFeedPerTokenUpdated, error) { + event := new(PriceRegistryPriceFeedPerTokenUpdated) + if err := _PriceRegistry.contract.UnpackLog(event, "PriceFeedPerTokenUpdated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type PriceRegistryPriceUpdaterRemovedIterator struct { + Event *PriceRegistryPriceUpdaterRemoved + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *PriceRegistryPriceUpdaterRemovedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(PriceRegistryPriceUpdaterRemoved) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1210,7 +2133,7 @@ func (it *PriceRegistryOwnershipTransferredIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(PriceRegistryOwnershipTransferred) + it.Event = new(PriceRegistryPriceUpdaterRemoved) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1225,51 +2148,42 @@ func (it *PriceRegistryOwnershipTransferredIterator) Next() bool { } } -func (it *PriceRegistryOwnershipTransferredIterator) Error() error { +func (it *PriceRegistryPriceUpdaterRemovedIterator) Error() error { return it.fail } -func (it *PriceRegistryOwnershipTransferredIterator) Close() error { +func (it *PriceRegistryPriceUpdaterRemovedIterator) Close() error { it.sub.Unsubscribe() return nil } -type PriceRegistryOwnershipTransferred struct { - From common.Address - To common.Address - Raw types.Log +type PriceRegistryPriceUpdaterRemoved struct { + PriceUpdater common.Address + Raw types.Log } -func (_PriceRegistry *PriceRegistryFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*PriceRegistryOwnershipTransferredIterator, error) { +func (_PriceRegistry *PriceRegistryFilterer) FilterPriceUpdaterRemoved(opts *bind.FilterOpts, priceUpdater []common.Address) (*PriceRegistryPriceUpdaterRemovedIterator, error) { - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) + var priceUpdaterRule []interface{} + for _, priceUpdaterItem := range priceUpdater { + priceUpdaterRule = append(priceUpdaterRule, priceUpdaterItem) } - logs, sub, err := _PriceRegistry.contract.FilterLogs(opts, "OwnershipTransferred", fromRule, toRule) + logs, sub, err := _PriceRegistry.contract.FilterLogs(opts, "PriceUpdaterRemoved", priceUpdaterRule) if err != nil { return nil, err } - return &PriceRegistryOwnershipTransferredIterator{contract: _PriceRegistry.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil + return &PriceRegistryPriceUpdaterRemovedIterator{contract: _PriceRegistry.contract, event: "PriceUpdaterRemoved", logs: logs, sub: sub}, nil } -func (_PriceRegistry *PriceRegistryFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *PriceRegistryOwnershipTransferred, from []common.Address, to []common.Address) (event.Subscription, error) { +func (_PriceRegistry *PriceRegistryFilterer) WatchPriceUpdaterRemoved(opts *bind.WatchOpts, sink chan<- *PriceRegistryPriceUpdaterRemoved, priceUpdater []common.Address) (event.Subscription, error) { - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) + var priceUpdaterRule []interface{} + for _, priceUpdaterItem := range priceUpdater { + priceUpdaterRule = append(priceUpdaterRule, priceUpdaterItem) } - logs, sub, err := _PriceRegistry.contract.WatchLogs(opts, "OwnershipTransferred", fromRule, toRule) + logs, sub, err := _PriceRegistry.contract.WatchLogs(opts, "PriceUpdaterRemoved", priceUpdaterRule) if err != nil { return nil, err } @@ -1279,8 +2193,8 @@ func (_PriceRegistry *PriceRegistryFilterer) WatchOwnershipTransferred(opts *bin select { case log := <-logs: - event := new(PriceRegistryOwnershipTransferred) - if err := _PriceRegistry.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + event := new(PriceRegistryPriceUpdaterRemoved) + if err := _PriceRegistry.contract.UnpackLog(event, "PriceUpdaterRemoved", log); err != nil { return err } event.Raw = log @@ -1301,17 +2215,17 @@ func (_PriceRegistry *PriceRegistryFilterer) WatchOwnershipTransferred(opts *bin }), nil } -func (_PriceRegistry *PriceRegistryFilterer) ParseOwnershipTransferred(log types.Log) (*PriceRegistryOwnershipTransferred, error) { - event := new(PriceRegistryOwnershipTransferred) - if err := _PriceRegistry.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { +func (_PriceRegistry *PriceRegistryFilterer) ParsePriceUpdaterRemoved(log types.Log) (*PriceRegistryPriceUpdaterRemoved, error) { + event := new(PriceRegistryPriceUpdaterRemoved) + if err := _PriceRegistry.contract.UnpackLog(event, "PriceUpdaterRemoved", log); err != nil { return nil, err } event.Raw = log return event, nil } -type PriceRegistryPriceFeedPerTokenUpdatedIterator struct { - Event *PriceRegistryPriceFeedPerTokenUpdated +type PriceRegistryPriceUpdaterSetIterator struct { + Event *PriceRegistryPriceUpdaterSet contract *bind.BoundContract event string @@ -1322,7 +2236,7 @@ type PriceRegistryPriceFeedPerTokenUpdatedIterator struct { fail error } -func (it *PriceRegistryPriceFeedPerTokenUpdatedIterator) Next() bool { +func (it *PriceRegistryPriceUpdaterSetIterator) Next() bool { if it.fail != nil { return false @@ -1331,7 +2245,7 @@ func (it *PriceRegistryPriceFeedPerTokenUpdatedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(PriceRegistryPriceFeedPerTokenUpdated) + it.Event = new(PriceRegistryPriceUpdaterSet) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1346,7 +2260,7 @@ func (it *PriceRegistryPriceFeedPerTokenUpdatedIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(PriceRegistryPriceFeedPerTokenUpdated) + it.Event = new(PriceRegistryPriceUpdaterSet) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1361,43 +2275,42 @@ func (it *PriceRegistryPriceFeedPerTokenUpdatedIterator) Next() bool { } } -func (it *PriceRegistryPriceFeedPerTokenUpdatedIterator) Error() error { +func (it *PriceRegistryPriceUpdaterSetIterator) Error() error { return it.fail } -func (it *PriceRegistryPriceFeedPerTokenUpdatedIterator) Close() error { +func (it *PriceRegistryPriceUpdaterSetIterator) Close() error { it.sub.Unsubscribe() return nil } -type PriceRegistryPriceFeedPerTokenUpdated struct { - Token common.Address - PriceFeedConfig IPriceRegistryTokenPriceFeedConfig - Raw types.Log +type PriceRegistryPriceUpdaterSet struct { + PriceUpdater common.Address + Raw types.Log } -func (_PriceRegistry *PriceRegistryFilterer) FilterPriceFeedPerTokenUpdated(opts *bind.FilterOpts, token []common.Address) (*PriceRegistryPriceFeedPerTokenUpdatedIterator, error) { +func (_PriceRegistry *PriceRegistryFilterer) FilterPriceUpdaterSet(opts *bind.FilterOpts, priceUpdater []common.Address) (*PriceRegistryPriceUpdaterSetIterator, error) { - var tokenRule []interface{} - for _, tokenItem := range token { - tokenRule = append(tokenRule, tokenItem) + var priceUpdaterRule []interface{} + for _, priceUpdaterItem := range priceUpdater { + priceUpdaterRule = append(priceUpdaterRule, priceUpdaterItem) } - logs, sub, err := _PriceRegistry.contract.FilterLogs(opts, "PriceFeedPerTokenUpdated", tokenRule) + logs, sub, err := _PriceRegistry.contract.FilterLogs(opts, "PriceUpdaterSet", priceUpdaterRule) if err != nil { return nil, err } - return &PriceRegistryPriceFeedPerTokenUpdatedIterator{contract: _PriceRegistry.contract, event: "PriceFeedPerTokenUpdated", logs: logs, sub: sub}, nil + return &PriceRegistryPriceUpdaterSetIterator{contract: _PriceRegistry.contract, event: "PriceUpdaterSet", logs: logs, sub: sub}, nil } -func (_PriceRegistry *PriceRegistryFilterer) WatchPriceFeedPerTokenUpdated(opts *bind.WatchOpts, sink chan<- *PriceRegistryPriceFeedPerTokenUpdated, token []common.Address) (event.Subscription, error) { +func (_PriceRegistry *PriceRegistryFilterer) WatchPriceUpdaterSet(opts *bind.WatchOpts, sink chan<- *PriceRegistryPriceUpdaterSet, priceUpdater []common.Address) (event.Subscription, error) { - var tokenRule []interface{} - for _, tokenItem := range token { - tokenRule = append(tokenRule, tokenItem) + var priceUpdaterRule []interface{} + for _, priceUpdaterItem := range priceUpdater { + priceUpdaterRule = append(priceUpdaterRule, priceUpdaterItem) } - logs, sub, err := _PriceRegistry.contract.WatchLogs(opts, "PriceFeedPerTokenUpdated", tokenRule) + logs, sub, err := _PriceRegistry.contract.WatchLogs(opts, "PriceUpdaterSet", priceUpdaterRule) if err != nil { return nil, err } @@ -1407,8 +2320,8 @@ func (_PriceRegistry *PriceRegistryFilterer) WatchPriceFeedPerTokenUpdated(opts select { case log := <-logs: - event := new(PriceRegistryPriceFeedPerTokenUpdated) - if err := _PriceRegistry.contract.UnpackLog(event, "PriceFeedPerTokenUpdated", log); err != nil { + event := new(PriceRegistryPriceUpdaterSet) + if err := _PriceRegistry.contract.UnpackLog(event, "PriceUpdaterSet", log); err != nil { return err } event.Raw = log @@ -1429,17 +2342,17 @@ func (_PriceRegistry *PriceRegistryFilterer) WatchPriceFeedPerTokenUpdated(opts }), nil } -func (_PriceRegistry *PriceRegistryFilterer) ParsePriceFeedPerTokenUpdated(log types.Log) (*PriceRegistryPriceFeedPerTokenUpdated, error) { - event := new(PriceRegistryPriceFeedPerTokenUpdated) - if err := _PriceRegistry.contract.UnpackLog(event, "PriceFeedPerTokenUpdated", log); err != nil { +func (_PriceRegistry *PriceRegistryFilterer) ParsePriceUpdaterSet(log types.Log) (*PriceRegistryPriceUpdaterSet, error) { + event := new(PriceRegistryPriceUpdaterSet) + if err := _PriceRegistry.contract.UnpackLog(event, "PriceUpdaterSet", log); err != nil { return nil, err } event.Raw = log return event, nil } -type PriceRegistryPriceUpdaterRemovedIterator struct { - Event *PriceRegistryPriceUpdaterRemoved +type PriceRegistryTokenTransferFeeConfigDeletedIterator struct { + Event *PriceRegistryTokenTransferFeeConfigDeleted contract *bind.BoundContract event string @@ -1450,7 +2363,7 @@ type PriceRegistryPriceUpdaterRemovedIterator struct { fail error } -func (it *PriceRegistryPriceUpdaterRemovedIterator) Next() bool { +func (it *PriceRegistryTokenTransferFeeConfigDeletedIterator) Next() bool { if it.fail != nil { return false @@ -1459,7 +2372,7 @@ func (it *PriceRegistryPriceUpdaterRemovedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(PriceRegistryPriceUpdaterRemoved) + it.Event = new(PriceRegistryTokenTransferFeeConfigDeleted) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1474,7 +2387,7 @@ func (it *PriceRegistryPriceUpdaterRemovedIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(PriceRegistryPriceUpdaterRemoved) + it.Event = new(PriceRegistryTokenTransferFeeConfigDeleted) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1489,42 +2402,51 @@ func (it *PriceRegistryPriceUpdaterRemovedIterator) Next() bool { } } -func (it *PriceRegistryPriceUpdaterRemovedIterator) Error() error { +func (it *PriceRegistryTokenTransferFeeConfigDeletedIterator) Error() error { return it.fail } -func (it *PriceRegistryPriceUpdaterRemovedIterator) Close() error { +func (it *PriceRegistryTokenTransferFeeConfigDeletedIterator) Close() error { it.sub.Unsubscribe() return nil } -type PriceRegistryPriceUpdaterRemoved struct { - PriceUpdater common.Address - Raw types.Log +type PriceRegistryTokenTransferFeeConfigDeleted struct { + DestChainSelector uint64 + Token common.Address + Raw types.Log } -func (_PriceRegistry *PriceRegistryFilterer) FilterPriceUpdaterRemoved(opts *bind.FilterOpts, priceUpdater []common.Address) (*PriceRegistryPriceUpdaterRemovedIterator, error) { +func (_PriceRegistry *PriceRegistryFilterer) FilterTokenTransferFeeConfigDeleted(opts *bind.FilterOpts, destChainSelector []uint64, token []common.Address) (*PriceRegistryTokenTransferFeeConfigDeletedIterator, error) { - var priceUpdaterRule []interface{} - for _, priceUpdaterItem := range priceUpdater { - priceUpdaterRule = append(priceUpdaterRule, priceUpdaterItem) + var destChainSelectorRule []interface{} + for _, destChainSelectorItem := range destChainSelector { + destChainSelectorRule = append(destChainSelectorRule, destChainSelectorItem) + } + var tokenRule []interface{} + for _, tokenItem := range token { + tokenRule = append(tokenRule, tokenItem) } - logs, sub, err := _PriceRegistry.contract.FilterLogs(opts, "PriceUpdaterRemoved", priceUpdaterRule) + logs, sub, err := _PriceRegistry.contract.FilterLogs(opts, "TokenTransferFeeConfigDeleted", destChainSelectorRule, tokenRule) if err != nil { return nil, err } - return &PriceRegistryPriceUpdaterRemovedIterator{contract: _PriceRegistry.contract, event: "PriceUpdaterRemoved", logs: logs, sub: sub}, nil + return &PriceRegistryTokenTransferFeeConfigDeletedIterator{contract: _PriceRegistry.contract, event: "TokenTransferFeeConfigDeleted", logs: logs, sub: sub}, nil } -func (_PriceRegistry *PriceRegistryFilterer) WatchPriceUpdaterRemoved(opts *bind.WatchOpts, sink chan<- *PriceRegistryPriceUpdaterRemoved, priceUpdater []common.Address) (event.Subscription, error) { +func (_PriceRegistry *PriceRegistryFilterer) WatchTokenTransferFeeConfigDeleted(opts *bind.WatchOpts, sink chan<- *PriceRegistryTokenTransferFeeConfigDeleted, destChainSelector []uint64, token []common.Address) (event.Subscription, error) { - var priceUpdaterRule []interface{} - for _, priceUpdaterItem := range priceUpdater { - priceUpdaterRule = append(priceUpdaterRule, priceUpdaterItem) + var destChainSelectorRule []interface{} + for _, destChainSelectorItem := range destChainSelector { + destChainSelectorRule = append(destChainSelectorRule, destChainSelectorItem) + } + var tokenRule []interface{} + for _, tokenItem := range token { + tokenRule = append(tokenRule, tokenItem) } - logs, sub, err := _PriceRegistry.contract.WatchLogs(opts, "PriceUpdaterRemoved", priceUpdaterRule) + logs, sub, err := _PriceRegistry.contract.WatchLogs(opts, "TokenTransferFeeConfigDeleted", destChainSelectorRule, tokenRule) if err != nil { return nil, err } @@ -1534,8 +2456,8 @@ func (_PriceRegistry *PriceRegistryFilterer) WatchPriceUpdaterRemoved(opts *bind select { case log := <-logs: - event := new(PriceRegistryPriceUpdaterRemoved) - if err := _PriceRegistry.contract.UnpackLog(event, "PriceUpdaterRemoved", log); err != nil { + event := new(PriceRegistryTokenTransferFeeConfigDeleted) + if err := _PriceRegistry.contract.UnpackLog(event, "TokenTransferFeeConfigDeleted", log); err != nil { return err } event.Raw = log @@ -1556,17 +2478,17 @@ func (_PriceRegistry *PriceRegistryFilterer) WatchPriceUpdaterRemoved(opts *bind }), nil } -func (_PriceRegistry *PriceRegistryFilterer) ParsePriceUpdaterRemoved(log types.Log) (*PriceRegistryPriceUpdaterRemoved, error) { - event := new(PriceRegistryPriceUpdaterRemoved) - if err := _PriceRegistry.contract.UnpackLog(event, "PriceUpdaterRemoved", log); err != nil { +func (_PriceRegistry *PriceRegistryFilterer) ParseTokenTransferFeeConfigDeleted(log types.Log) (*PriceRegistryTokenTransferFeeConfigDeleted, error) { + event := new(PriceRegistryTokenTransferFeeConfigDeleted) + if err := _PriceRegistry.contract.UnpackLog(event, "TokenTransferFeeConfigDeleted", log); err != nil { return nil, err } event.Raw = log return event, nil } -type PriceRegistryPriceUpdaterSetIterator struct { - Event *PriceRegistryPriceUpdaterSet +type PriceRegistryTokenTransferFeeConfigUpdatedIterator struct { + Event *PriceRegistryTokenTransferFeeConfigUpdated contract *bind.BoundContract event string @@ -1577,7 +2499,7 @@ type PriceRegistryPriceUpdaterSetIterator struct { fail error } -func (it *PriceRegistryPriceUpdaterSetIterator) Next() bool { +func (it *PriceRegistryTokenTransferFeeConfigUpdatedIterator) Next() bool { if it.fail != nil { return false @@ -1586,7 +2508,7 @@ func (it *PriceRegistryPriceUpdaterSetIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(PriceRegistryPriceUpdaterSet) + it.Event = new(PriceRegistryTokenTransferFeeConfigUpdated) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1601,7 +2523,7 @@ func (it *PriceRegistryPriceUpdaterSetIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(PriceRegistryPriceUpdaterSet) + it.Event = new(PriceRegistryTokenTransferFeeConfigUpdated) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1616,42 +2538,52 @@ func (it *PriceRegistryPriceUpdaterSetIterator) Next() bool { } } -func (it *PriceRegistryPriceUpdaterSetIterator) Error() error { +func (it *PriceRegistryTokenTransferFeeConfigUpdatedIterator) Error() error { return it.fail } -func (it *PriceRegistryPriceUpdaterSetIterator) Close() error { +func (it *PriceRegistryTokenTransferFeeConfigUpdatedIterator) Close() error { it.sub.Unsubscribe() return nil } -type PriceRegistryPriceUpdaterSet struct { - PriceUpdater common.Address - Raw types.Log +type PriceRegistryTokenTransferFeeConfigUpdated struct { + DestChainSelector uint64 + Token common.Address + TokenTransferFeeConfig PriceRegistryTokenTransferFeeConfig + Raw types.Log } -func (_PriceRegistry *PriceRegistryFilterer) FilterPriceUpdaterSet(opts *bind.FilterOpts, priceUpdater []common.Address) (*PriceRegistryPriceUpdaterSetIterator, error) { +func (_PriceRegistry *PriceRegistryFilterer) FilterTokenTransferFeeConfigUpdated(opts *bind.FilterOpts, destChainSelector []uint64, token []common.Address) (*PriceRegistryTokenTransferFeeConfigUpdatedIterator, error) { - var priceUpdaterRule []interface{} - for _, priceUpdaterItem := range priceUpdater { - priceUpdaterRule = append(priceUpdaterRule, priceUpdaterItem) + var destChainSelectorRule []interface{} + for _, destChainSelectorItem := range destChainSelector { + destChainSelectorRule = append(destChainSelectorRule, destChainSelectorItem) + } + var tokenRule []interface{} + for _, tokenItem := range token { + tokenRule = append(tokenRule, tokenItem) } - logs, sub, err := _PriceRegistry.contract.FilterLogs(opts, "PriceUpdaterSet", priceUpdaterRule) + logs, sub, err := _PriceRegistry.contract.FilterLogs(opts, "TokenTransferFeeConfigUpdated", destChainSelectorRule, tokenRule) if err != nil { return nil, err } - return &PriceRegistryPriceUpdaterSetIterator{contract: _PriceRegistry.contract, event: "PriceUpdaterSet", logs: logs, sub: sub}, nil + return &PriceRegistryTokenTransferFeeConfigUpdatedIterator{contract: _PriceRegistry.contract, event: "TokenTransferFeeConfigUpdated", logs: logs, sub: sub}, nil } -func (_PriceRegistry *PriceRegistryFilterer) WatchPriceUpdaterSet(opts *bind.WatchOpts, sink chan<- *PriceRegistryPriceUpdaterSet, priceUpdater []common.Address) (event.Subscription, error) { +func (_PriceRegistry *PriceRegistryFilterer) WatchTokenTransferFeeConfigUpdated(opts *bind.WatchOpts, sink chan<- *PriceRegistryTokenTransferFeeConfigUpdated, destChainSelector []uint64, token []common.Address) (event.Subscription, error) { - var priceUpdaterRule []interface{} - for _, priceUpdaterItem := range priceUpdater { - priceUpdaterRule = append(priceUpdaterRule, priceUpdaterItem) + var destChainSelectorRule []interface{} + for _, destChainSelectorItem := range destChainSelector { + destChainSelectorRule = append(destChainSelectorRule, destChainSelectorItem) + } + var tokenRule []interface{} + for _, tokenItem := range token { + tokenRule = append(tokenRule, tokenItem) } - logs, sub, err := _PriceRegistry.contract.WatchLogs(opts, "PriceUpdaterSet", priceUpdaterRule) + logs, sub, err := _PriceRegistry.contract.WatchLogs(opts, "TokenTransferFeeConfigUpdated", destChainSelectorRule, tokenRule) if err != nil { return nil, err } @@ -1661,8 +2593,8 @@ func (_PriceRegistry *PriceRegistryFilterer) WatchPriceUpdaterSet(opts *bind.Wat select { case log := <-logs: - event := new(PriceRegistryPriceUpdaterSet) - if err := _PriceRegistry.contract.UnpackLog(event, "PriceUpdaterSet", log); err != nil { + event := new(PriceRegistryTokenTransferFeeConfigUpdated) + if err := _PriceRegistry.contract.UnpackLog(event, "TokenTransferFeeConfigUpdated", log); err != nil { return err } event.Raw = log @@ -1683,9 +2615,9 @@ func (_PriceRegistry *PriceRegistryFilterer) WatchPriceUpdaterSet(opts *bind.Wat }), nil } -func (_PriceRegistry *PriceRegistryFilterer) ParsePriceUpdaterSet(log types.Log) (*PriceRegistryPriceUpdaterSet, error) { - event := new(PriceRegistryPriceUpdaterSet) - if err := _PriceRegistry.contract.UnpackLog(event, "PriceUpdaterSet", log); err != nil { +func (_PriceRegistry *PriceRegistryFilterer) ParseTokenTransferFeeConfigUpdated(log types.Log) (*PriceRegistryTokenTransferFeeConfigUpdated, error) { + event := new(PriceRegistryTokenTransferFeeConfigUpdated) + if err := _PriceRegistry.contract.UnpackLog(event, "TokenTransferFeeConfigUpdated", log); err != nil { return nil, err } event.Raw = log @@ -1954,6 +2886,11 @@ type GetTokenAndGasPrices struct { TokenPrice *big.Int GasPriceValue *big.Int } +type GetValidatedRampMessageParams struct { + MsgFeeJuels *big.Int + IsOutOfOrderExecution bool + ConvertedExtraArgs []byte +} func (_PriceRegistry *PriceRegistry) ParseLog(log types.Log) (generated.AbigenLog, error) { switch log.Topics[0] { @@ -1961,6 +2898,10 @@ func (_PriceRegistry *PriceRegistry) ParseLog(log types.Log) (generated.AbigenLo return _PriceRegistry.ParseAuthorizedCallerAdded(log) case _PriceRegistry.abi.Events["AuthorizedCallerRemoved"].ID: return _PriceRegistry.ParseAuthorizedCallerRemoved(log) + case _PriceRegistry.abi.Events["DestChainAdded"].ID: + return _PriceRegistry.ParseDestChainAdded(log) + case _PriceRegistry.abi.Events["DestChainDynamicConfigUpdated"].ID: + return _PriceRegistry.ParseDestChainDynamicConfigUpdated(log) case _PriceRegistry.abi.Events["FeeTokenAdded"].ID: return _PriceRegistry.ParseFeeTokenAdded(log) case _PriceRegistry.abi.Events["FeeTokenRemoved"].ID: @@ -1969,12 +2910,18 @@ func (_PriceRegistry *PriceRegistry) ParseLog(log types.Log) (generated.AbigenLo return _PriceRegistry.ParseOwnershipTransferRequested(log) case _PriceRegistry.abi.Events["OwnershipTransferred"].ID: return _PriceRegistry.ParseOwnershipTransferred(log) + case _PriceRegistry.abi.Events["PremiumMultiplierWeiPerEthUpdated"].ID: + return _PriceRegistry.ParsePremiumMultiplierWeiPerEthUpdated(log) case _PriceRegistry.abi.Events["PriceFeedPerTokenUpdated"].ID: return _PriceRegistry.ParsePriceFeedPerTokenUpdated(log) case _PriceRegistry.abi.Events["PriceUpdaterRemoved"].ID: return _PriceRegistry.ParsePriceUpdaterRemoved(log) case _PriceRegistry.abi.Events["PriceUpdaterSet"].ID: return _PriceRegistry.ParsePriceUpdaterSet(log) + case _PriceRegistry.abi.Events["TokenTransferFeeConfigDeleted"].ID: + return _PriceRegistry.ParseTokenTransferFeeConfigDeleted(log) + case _PriceRegistry.abi.Events["TokenTransferFeeConfigUpdated"].ID: + return _PriceRegistry.ParseTokenTransferFeeConfigUpdated(log) case _PriceRegistry.abi.Events["UsdPerTokenUpdated"].ID: return _PriceRegistry.ParseUsdPerTokenUpdated(log) case _PriceRegistry.abi.Events["UsdPerUnitGasUpdated"].ID: @@ -1993,6 +2940,14 @@ func (PriceRegistryAuthorizedCallerRemoved) Topic() common.Hash { return common.HexToHash("0xc3803387881faad271c47728894e3e36fac830ffc8602ca6fc07733cbda77580") } +func (PriceRegistryDestChainAdded) Topic() common.Hash { + return common.HexToHash("0xd883f18d08e8ea5c2af22d13fb6cab86cc057d795d2735f83a8ff137d39d1b8f") +} + +func (PriceRegistryDestChainDynamicConfigUpdated) Topic() common.Hash { + return common.HexToHash("0xd42d3a670a4f1ab5d8703efa22bb17041446365cfcfa33980ced685a080cf7cb") +} + func (PriceRegistryFeeTokenAdded) Topic() common.Hash { return common.HexToHash("0xdf1b1bd32a69711488d71554706bb130b1fc63a5fa1a2cd85e8440f84065ba23") } @@ -2009,6 +2964,10 @@ func (PriceRegistryOwnershipTransferred) Topic() common.Hash { return common.HexToHash("0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0") } +func (PriceRegistryPremiumMultiplierWeiPerEthUpdated) Topic() common.Hash { + return common.HexToHash("0xbb77da6f7210cdd16904228a9360133d1d7dfff99b1bc75f128da5b53e28f97d") +} + func (PriceRegistryPriceFeedPerTokenUpdated) Topic() common.Hash { return common.HexToHash("0x08a5f7f5bb38a81d8e43aca13ecd76431dbf8816ae4699affff7b00b2fc1c464") } @@ -2021,6 +2980,14 @@ func (PriceRegistryPriceUpdaterSet) Topic() common.Hash { return common.HexToHash("0x34a02290b7920078c19f58e94b78c77eb9cc10195b20676e19bd3b82085893b8") } +func (PriceRegistryTokenTransferFeeConfigDeleted) Topic() common.Hash { + return common.HexToHash("0x4de5b1bcbca6018c11303a2c3f4a4b4f22a1c741d8c4ba430d246ac06c5ddf8b") +} + +func (PriceRegistryTokenTransferFeeConfigUpdated) Topic() common.Hash { + return common.HexToHash("0x94967ae9ea7729ad4f54021c1981765d2b1d954f7c92fbec340aa0a54f46b8b5") +} + func (PriceRegistryUsdPerTokenUpdated) Topic() common.Hash { return common.HexToHash("0x52f50aa6d1a95a4595361ecf953d095f125d442e4673716dede699e049de148a") } @@ -2038,12 +3005,18 @@ type PriceRegistryInterface interface { GetAllAuthorizedCallers(opts *bind.CallOpts) ([]common.Address, error) + GetDestChainDynamicConfig(opts *bind.CallOpts, destChainSelector uint64) (PriceRegistryDestChainDynamicConfig, error) + GetDestinationChainGasPrice(opts *bind.CallOpts, destChainSelector uint64) (InternalTimestampedPackedUint224, error) GetFeeTokens(opts *bind.CallOpts) ([]common.Address, error) + GetPremiumMultiplierWeiPerEth(opts *bind.CallOpts, token common.Address) (uint64, error) + GetStalenessThreshold(opts *bind.CallOpts) (*big.Int, error) + GetStaticConfig(opts *bind.CallOpts) (PriceRegistryStaticConfig, error) + GetTokenAndGasPrices(opts *bind.CallOpts, token common.Address, destChainSelector uint64) (GetTokenAndGasPrices, error) @@ -2054,6 +3027,14 @@ type PriceRegistryInterface interface { GetTokenPrices(opts *bind.CallOpts, tokens []common.Address) ([]InternalTimestampedPackedUint224, error) + GetTokenTransferFeeConfig(opts *bind.CallOpts, destChainSelector uint64, token common.Address) (PriceRegistryTokenTransferFeeConfig, error) + + GetValidatedFee(opts *bind.CallOpts, destChainSelector uint64, message ClientEVM2AnyMessage) (*big.Int, error) + + GetValidatedRampMessageParams(opts *bind.CallOpts, message InternalEVM2AnyRampMessage, sourceTokenAmounts []ClientEVMTokenAmount) (GetValidatedRampMessageParams, + + error) + GetValidatedTokenPrice(opts *bind.CallOpts, token common.Address) (*big.Int, error) Owner(opts *bind.CallOpts) (common.Address, error) @@ -2064,8 +3045,14 @@ type PriceRegistryInterface interface { ApplyAuthorizedCallerUpdates(opts *bind.TransactOpts, authorizedCallerArgs AuthorizedCallersAuthorizedCallerArgs) (*types.Transaction, error) + ApplyDestChainConfigUpdates(opts *bind.TransactOpts, destChainConfigArgs []PriceRegistryDestChainDynamicConfigArgs) (*types.Transaction, error) + ApplyFeeTokensUpdates(opts *bind.TransactOpts, feeTokensToAdd []common.Address, feeTokensToRemove []common.Address) (*types.Transaction, error) + ApplyPremiumMultiplierWeiPerEthUpdates(opts *bind.TransactOpts, premiumMultiplierWeiPerEthArgs []PriceRegistryPremiumMultiplierWeiPerEthArgs) (*types.Transaction, error) + + ApplyTokenTransferFeeConfigUpdates(opts *bind.TransactOpts, tokenTransferFeeConfigArgs []PriceRegistryTokenTransferFeeConfigArgs, tokensToUseDefaultFeeConfigs []PriceRegistryTokenTransferFeeConfigRemoveArgs) (*types.Transaction, error) + TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) UpdatePrices(opts *bind.TransactOpts, priceUpdates InternalPriceUpdates) (*types.Transaction, error) @@ -2084,6 +3071,18 @@ type PriceRegistryInterface interface { ParseAuthorizedCallerRemoved(log types.Log) (*PriceRegistryAuthorizedCallerRemoved, error) + FilterDestChainAdded(opts *bind.FilterOpts, destChainSelector []uint64) (*PriceRegistryDestChainAddedIterator, error) + + WatchDestChainAdded(opts *bind.WatchOpts, sink chan<- *PriceRegistryDestChainAdded, destChainSelector []uint64) (event.Subscription, error) + + ParseDestChainAdded(log types.Log) (*PriceRegistryDestChainAdded, error) + + FilterDestChainDynamicConfigUpdated(opts *bind.FilterOpts, destChainSelector []uint64) (*PriceRegistryDestChainDynamicConfigUpdatedIterator, error) + + WatchDestChainDynamicConfigUpdated(opts *bind.WatchOpts, sink chan<- *PriceRegistryDestChainDynamicConfigUpdated, destChainSelector []uint64) (event.Subscription, error) + + ParseDestChainDynamicConfigUpdated(log types.Log) (*PriceRegistryDestChainDynamicConfigUpdated, error) + FilterFeeTokenAdded(opts *bind.FilterOpts, feeToken []common.Address) (*PriceRegistryFeeTokenAddedIterator, error) WatchFeeTokenAdded(opts *bind.WatchOpts, sink chan<- *PriceRegistryFeeTokenAdded, feeToken []common.Address) (event.Subscription, error) @@ -2108,6 +3107,12 @@ type PriceRegistryInterface interface { ParseOwnershipTransferred(log types.Log) (*PriceRegistryOwnershipTransferred, error) + FilterPremiumMultiplierWeiPerEthUpdated(opts *bind.FilterOpts, token []common.Address) (*PriceRegistryPremiumMultiplierWeiPerEthUpdatedIterator, error) + + WatchPremiumMultiplierWeiPerEthUpdated(opts *bind.WatchOpts, sink chan<- *PriceRegistryPremiumMultiplierWeiPerEthUpdated, token []common.Address) (event.Subscription, error) + + ParsePremiumMultiplierWeiPerEthUpdated(log types.Log) (*PriceRegistryPremiumMultiplierWeiPerEthUpdated, error) + FilterPriceFeedPerTokenUpdated(opts *bind.FilterOpts, token []common.Address) (*PriceRegistryPriceFeedPerTokenUpdatedIterator, error) WatchPriceFeedPerTokenUpdated(opts *bind.WatchOpts, sink chan<- *PriceRegistryPriceFeedPerTokenUpdated, token []common.Address) (event.Subscription, error) @@ -2126,6 +3131,18 @@ type PriceRegistryInterface interface { ParsePriceUpdaterSet(log types.Log) (*PriceRegistryPriceUpdaterSet, error) + FilterTokenTransferFeeConfigDeleted(opts *bind.FilterOpts, destChainSelector []uint64, token []common.Address) (*PriceRegistryTokenTransferFeeConfigDeletedIterator, error) + + WatchTokenTransferFeeConfigDeleted(opts *bind.WatchOpts, sink chan<- *PriceRegistryTokenTransferFeeConfigDeleted, destChainSelector []uint64, token []common.Address) (event.Subscription, error) + + ParseTokenTransferFeeConfigDeleted(log types.Log) (*PriceRegistryTokenTransferFeeConfigDeleted, error) + + FilterTokenTransferFeeConfigUpdated(opts *bind.FilterOpts, destChainSelector []uint64, token []common.Address) (*PriceRegistryTokenTransferFeeConfigUpdatedIterator, error) + + WatchTokenTransferFeeConfigUpdated(opts *bind.WatchOpts, sink chan<- *PriceRegistryTokenTransferFeeConfigUpdated, destChainSelector []uint64, token []common.Address) (event.Subscription, error) + + ParseTokenTransferFeeConfigUpdated(log types.Log) (*PriceRegistryTokenTransferFeeConfigUpdated, error) + FilterUsdPerTokenUpdated(opts *bind.FilterOpts, token []common.Address) (*PriceRegistryUsdPerTokenUpdatedIterator, error) WatchUsdPerTokenUpdated(opts *bind.WatchOpts, sink chan<- *PriceRegistryUsdPerTokenUpdated, token []common.Address) (event.Subscription, error) diff --git a/core/gethwrappers/ccip/generation/generated-wrapper-dependency-versions-do-not-edit.txt b/core/gethwrappers/ccip/generation/generated-wrapper-dependency-versions-do-not-edit.txt index 26c576c9c9..a93e075ece 100644 --- a/core/gethwrappers/ccip/generation/generated-wrapper-dependency-versions-do-not-edit.txt +++ b/core/gethwrappers/ccip/generation/generated-wrapper-dependency-versions-do-not-edit.txt @@ -10,7 +10,7 @@ commit_store: ../../../contracts/solc/v0.8.24/CommitStore/CommitStore.abi ../../ commit_store_helper: ../../../contracts/solc/v0.8.24/CommitStoreHelper/CommitStoreHelper.abi ../../../contracts/solc/v0.8.24/CommitStoreHelper/CommitStoreHelper.bin ebd8aac686fa28a71d4212bcd25a28f8f640d50dce5e50498b2f6b8534890b69 ether_sender_receiver: ../../../contracts/solc/v0.8.24/EtherSenderReceiver/EtherSenderReceiver.abi ../../../contracts/solc/v0.8.24/EtherSenderReceiver/EtherSenderReceiver.bin 09510a3f773f108a3c231e8d202835c845ded862d071ec54c4f89c12d868b8de evm_2_evm_multi_offramp: ../../../contracts/solc/v0.8.24/EVM2EVMMultiOffRamp/EVM2EVMMultiOffRamp.abi ../../../contracts/solc/v0.8.24/EVM2EVMMultiOffRamp/EVM2EVMMultiOffRamp.bin 2ab5cd4acb0c0b7087397d0c99e928119ef9e174bfd55628e6b2daf14f2da1fe -evm_2_evm_multi_onramp: ../../../contracts/solc/v0.8.24/EVM2EVMMultiOnRamp/EVM2EVMMultiOnRamp.abi ../../../contracts/solc/v0.8.24/EVM2EVMMultiOnRamp/EVM2EVMMultiOnRamp.bin 85698e5c4c6cb10f4f969cc1740b9ff094c469530e0a763670cf388311f00619 +evm_2_evm_multi_onramp: ../../../contracts/solc/v0.8.24/EVM2EVMMultiOnRamp/EVM2EVMMultiOnRamp.abi ../../../contracts/solc/v0.8.24/EVM2EVMMultiOnRamp/EVM2EVMMultiOnRamp.bin 8fce08f64dfd8c0a25407244db525f11ee2028dcac45531ac194ce17b42009cd evm_2_evm_offramp: ../../../contracts/solc/v0.8.24/EVM2EVMOffRamp/EVM2EVMOffRamp.abi ../../../contracts/solc/v0.8.24/EVM2EVMOffRamp/EVM2EVMOffRamp.bin b6132cb22370d62b1b20174bbe832ec87df61f6ab65f7fe2515733bdd10a30f5 evm_2_evm_onramp: ../../../contracts/solc/v0.8.24/EVM2EVMOnRamp/EVM2EVMOnRamp.abi ../../../contracts/solc/v0.8.24/EVM2EVMOnRamp/EVM2EVMOnRamp.bin 383e9930fbc1b7fbb6554cc8857229d207fd6742e87c7fb1a37002347e8de8e2 lock_release_token_pool: ../../../contracts/solc/v0.8.24/LockReleaseTokenPool/LockReleaseTokenPool.abi ../../../contracts/solc/v0.8.24/LockReleaseTokenPool/LockReleaseTokenPool.bin c65c226e1e4d38414bd4a1b76fc8aca3cb3dd98df61268424c44564f455d3752 @@ -25,7 +25,7 @@ multi_aggregate_rate_limiter: ../../../contracts/solc/v0.8.24/MultiAggregateRate nonce_manager: ../../../contracts/solc/v0.8.24/NonceManager/NonceManager.abi ../../../contracts/solc/v0.8.24/NonceManager/NonceManager.bin cdc11c1ab4c1c3fd77f30215e9c579404a6e60eb9adc213d73ca0773c3bb5784 ocr3_config_encoder: ../../../contracts/solc/v0.8.24/IOCR3ConfigEncoder/IOCR3ConfigEncoder.abi ../../../contracts/solc/v0.8.24/IOCR3ConfigEncoder/IOCR3ConfigEncoder.bin e21180898e1ad54a045ee20add85a2793c681425ea06f66d1a9e5cab128b6487 ping_pong_demo: ../../../contracts/solc/v0.8.24/PingPongDemo/PingPongDemo.abi ../../../contracts/solc/v0.8.24/PingPongDemo/PingPongDemo.bin 1588313bb5e781d181a825247d30828f59007700f36b4b9b00391592b06ff4b4 -price_registry: ../../../contracts/solc/v0.8.24/PriceRegistry/PriceRegistry.abi ../../../contracts/solc/v0.8.24/PriceRegistry/PriceRegistry.bin 0b3e253684d7085aa11f9179b71453b9db9d11cabea41605d5b4ac4128f85bfb +price_registry: ../../../contracts/solc/v0.8.24/PriceRegistry/PriceRegistry.abi ../../../contracts/solc/v0.8.24/PriceRegistry/PriceRegistry.bin 42e025609faf8a3b3036430170c1531bceff37f30bd050e430fe5617faca579b registry_module_owner_custom: ../../../contracts/solc/v0.8.24/RegistryModuleOwnerCustom/RegistryModuleOwnerCustom.abi ../../../contracts/solc/v0.8.24/RegistryModuleOwnerCustom/RegistryModuleOwnerCustom.bin cbe7698bfd811b485ac3856daf073a7bdebeefdf2583403ca4a19d5b7e2d4ae8 router: ../../../contracts/solc/v0.8.24/Router/Router.abi ../../../contracts/solc/v0.8.24/Router/Router.bin 42576577e81beea9a069bd9229caaa9a71227fbaef3871a1a2e69fd218216290 self_funded_ping_pong: ../../../contracts/solc/v0.8.24/SelfFundedPingPong/SelfFundedPingPong.abi ../../../contracts/solc/v0.8.24/SelfFundedPingPong/SelfFundedPingPong.bin 86e169636e5633854ed0b709c804066b615040bceba25aa5137450fbe6f76fa3 diff --git a/core/gethwrappers/ccip/mocks/price_registry_interface.go b/core/gethwrappers/ccip/mocks/price_registry_interface.go index 45e9214737..9b31b6d9a0 100644 --- a/core/gethwrappers/ccip/mocks/price_registry_interface.go +++ b/core/gethwrappers/ccip/mocks/price_registry_interface.go @@ -104,6 +104,36 @@ func (_m *PriceRegistryInterface) ApplyAuthorizedCallerUpdates(opts *bind.Transa return r0, r1 } +// ApplyDestChainConfigUpdates provides a mock function with given fields: opts, destChainConfigArgs +func (_m *PriceRegistryInterface) ApplyDestChainConfigUpdates(opts *bind.TransactOpts, destChainConfigArgs []price_registry.PriceRegistryDestChainDynamicConfigArgs) (*types.Transaction, error) { + ret := _m.Called(opts, destChainConfigArgs) + + if len(ret) == 0 { + panic("no return value specified for ApplyDestChainConfigUpdates") + } + + var r0 *types.Transaction + var r1 error + if rf, ok := ret.Get(0).(func(*bind.TransactOpts, []price_registry.PriceRegistryDestChainDynamicConfigArgs) (*types.Transaction, error)); ok { + return rf(opts, destChainConfigArgs) + } + if rf, ok := ret.Get(0).(func(*bind.TransactOpts, []price_registry.PriceRegistryDestChainDynamicConfigArgs) *types.Transaction); ok { + r0 = rf(opts, destChainConfigArgs) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*types.Transaction) + } + } + + if rf, ok := ret.Get(1).(func(*bind.TransactOpts, []price_registry.PriceRegistryDestChainDynamicConfigArgs) error); ok { + r1 = rf(opts, destChainConfigArgs) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + // ApplyFeeTokensUpdates provides a mock function with given fields: opts, feeTokensToAdd, feeTokensToRemove func (_m *PriceRegistryInterface) ApplyFeeTokensUpdates(opts *bind.TransactOpts, feeTokensToAdd []common.Address, feeTokensToRemove []common.Address) (*types.Transaction, error) { ret := _m.Called(opts, feeTokensToAdd, feeTokensToRemove) @@ -134,6 +164,66 @@ func (_m *PriceRegistryInterface) ApplyFeeTokensUpdates(opts *bind.TransactOpts, return r0, r1 } +// ApplyPremiumMultiplierWeiPerEthUpdates provides a mock function with given fields: opts, premiumMultiplierWeiPerEthArgs +func (_m *PriceRegistryInterface) ApplyPremiumMultiplierWeiPerEthUpdates(opts *bind.TransactOpts, premiumMultiplierWeiPerEthArgs []price_registry.PriceRegistryPremiumMultiplierWeiPerEthArgs) (*types.Transaction, error) { + ret := _m.Called(opts, premiumMultiplierWeiPerEthArgs) + + if len(ret) == 0 { + panic("no return value specified for ApplyPremiumMultiplierWeiPerEthUpdates") + } + + var r0 *types.Transaction + var r1 error + if rf, ok := ret.Get(0).(func(*bind.TransactOpts, []price_registry.PriceRegistryPremiumMultiplierWeiPerEthArgs) (*types.Transaction, error)); ok { + return rf(opts, premiumMultiplierWeiPerEthArgs) + } + if rf, ok := ret.Get(0).(func(*bind.TransactOpts, []price_registry.PriceRegistryPremiumMultiplierWeiPerEthArgs) *types.Transaction); ok { + r0 = rf(opts, premiumMultiplierWeiPerEthArgs) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*types.Transaction) + } + } + + if rf, ok := ret.Get(1).(func(*bind.TransactOpts, []price_registry.PriceRegistryPremiumMultiplierWeiPerEthArgs) error); ok { + r1 = rf(opts, premiumMultiplierWeiPerEthArgs) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// ApplyTokenTransferFeeConfigUpdates provides a mock function with given fields: opts, tokenTransferFeeConfigArgs, tokensToUseDefaultFeeConfigs +func (_m *PriceRegistryInterface) ApplyTokenTransferFeeConfigUpdates(opts *bind.TransactOpts, tokenTransferFeeConfigArgs []price_registry.PriceRegistryTokenTransferFeeConfigArgs, tokensToUseDefaultFeeConfigs []price_registry.PriceRegistryTokenTransferFeeConfigRemoveArgs) (*types.Transaction, error) { + ret := _m.Called(opts, tokenTransferFeeConfigArgs, tokensToUseDefaultFeeConfigs) + + if len(ret) == 0 { + panic("no return value specified for ApplyTokenTransferFeeConfigUpdates") + } + + var r0 *types.Transaction + var r1 error + if rf, ok := ret.Get(0).(func(*bind.TransactOpts, []price_registry.PriceRegistryTokenTransferFeeConfigArgs, []price_registry.PriceRegistryTokenTransferFeeConfigRemoveArgs) (*types.Transaction, error)); ok { + return rf(opts, tokenTransferFeeConfigArgs, tokensToUseDefaultFeeConfigs) + } + if rf, ok := ret.Get(0).(func(*bind.TransactOpts, []price_registry.PriceRegistryTokenTransferFeeConfigArgs, []price_registry.PriceRegistryTokenTransferFeeConfigRemoveArgs) *types.Transaction); ok { + r0 = rf(opts, tokenTransferFeeConfigArgs, tokensToUseDefaultFeeConfigs) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*types.Transaction) + } + } + + if rf, ok := ret.Get(1).(func(*bind.TransactOpts, []price_registry.PriceRegistryTokenTransferFeeConfigArgs, []price_registry.PriceRegistryTokenTransferFeeConfigRemoveArgs) error); ok { + r1 = rf(opts, tokenTransferFeeConfigArgs, tokensToUseDefaultFeeConfigs) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + // ConvertTokenAmount provides a mock function with given fields: opts, fromToken, fromTokenAmount, toToken func (_m *PriceRegistryInterface) ConvertTokenAmount(opts *bind.CallOpts, fromToken common.Address, fromTokenAmount *big.Int, toToken common.Address) (*big.Int, error) { ret := _m.Called(opts, fromToken, fromTokenAmount, toToken) @@ -224,6 +314,66 @@ func (_m *PriceRegistryInterface) FilterAuthorizedCallerRemoved(opts *bind.Filte return r0, r1 } +// FilterDestChainAdded provides a mock function with given fields: opts, destChainSelector +func (_m *PriceRegistryInterface) FilterDestChainAdded(opts *bind.FilterOpts, destChainSelector []uint64) (*price_registry.PriceRegistryDestChainAddedIterator, error) { + ret := _m.Called(opts, destChainSelector) + + if len(ret) == 0 { + panic("no return value specified for FilterDestChainAdded") + } + + var r0 *price_registry.PriceRegistryDestChainAddedIterator + var r1 error + if rf, ok := ret.Get(0).(func(*bind.FilterOpts, []uint64) (*price_registry.PriceRegistryDestChainAddedIterator, error)); ok { + return rf(opts, destChainSelector) + } + if rf, ok := ret.Get(0).(func(*bind.FilterOpts, []uint64) *price_registry.PriceRegistryDestChainAddedIterator); ok { + r0 = rf(opts, destChainSelector) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*price_registry.PriceRegistryDestChainAddedIterator) + } + } + + if rf, ok := ret.Get(1).(func(*bind.FilterOpts, []uint64) error); ok { + r1 = rf(opts, destChainSelector) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// FilterDestChainDynamicConfigUpdated provides a mock function with given fields: opts, destChainSelector +func (_m *PriceRegistryInterface) FilterDestChainDynamicConfigUpdated(opts *bind.FilterOpts, destChainSelector []uint64) (*price_registry.PriceRegistryDestChainDynamicConfigUpdatedIterator, error) { + ret := _m.Called(opts, destChainSelector) + + if len(ret) == 0 { + panic("no return value specified for FilterDestChainDynamicConfigUpdated") + } + + var r0 *price_registry.PriceRegistryDestChainDynamicConfigUpdatedIterator + var r1 error + if rf, ok := ret.Get(0).(func(*bind.FilterOpts, []uint64) (*price_registry.PriceRegistryDestChainDynamicConfigUpdatedIterator, error)); ok { + return rf(opts, destChainSelector) + } + if rf, ok := ret.Get(0).(func(*bind.FilterOpts, []uint64) *price_registry.PriceRegistryDestChainDynamicConfigUpdatedIterator); ok { + r0 = rf(opts, destChainSelector) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*price_registry.PriceRegistryDestChainDynamicConfigUpdatedIterator) + } + } + + if rf, ok := ret.Get(1).(func(*bind.FilterOpts, []uint64) error); ok { + r1 = rf(opts, destChainSelector) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + // FilterFeeTokenAdded provides a mock function with given fields: opts, feeToken func (_m *PriceRegistryInterface) FilterFeeTokenAdded(opts *bind.FilterOpts, feeToken []common.Address) (*price_registry.PriceRegistryFeeTokenAddedIterator, error) { ret := _m.Called(opts, feeToken) @@ -344,6 +494,36 @@ func (_m *PriceRegistryInterface) FilterOwnershipTransferred(opts *bind.FilterOp return r0, r1 } +// FilterPremiumMultiplierWeiPerEthUpdated provides a mock function with given fields: opts, token +func (_m *PriceRegistryInterface) FilterPremiumMultiplierWeiPerEthUpdated(opts *bind.FilterOpts, token []common.Address) (*price_registry.PriceRegistryPremiumMultiplierWeiPerEthUpdatedIterator, error) { + ret := _m.Called(opts, token) + + if len(ret) == 0 { + panic("no return value specified for FilterPremiumMultiplierWeiPerEthUpdated") + } + + var r0 *price_registry.PriceRegistryPremiumMultiplierWeiPerEthUpdatedIterator + var r1 error + if rf, ok := ret.Get(0).(func(*bind.FilterOpts, []common.Address) (*price_registry.PriceRegistryPremiumMultiplierWeiPerEthUpdatedIterator, error)); ok { + return rf(opts, token) + } + if rf, ok := ret.Get(0).(func(*bind.FilterOpts, []common.Address) *price_registry.PriceRegistryPremiumMultiplierWeiPerEthUpdatedIterator); ok { + r0 = rf(opts, token) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*price_registry.PriceRegistryPremiumMultiplierWeiPerEthUpdatedIterator) + } + } + + if rf, ok := ret.Get(1).(func(*bind.FilterOpts, []common.Address) error); ok { + r1 = rf(opts, token) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + // FilterPriceFeedPerTokenUpdated provides a mock function with given fields: opts, token func (_m *PriceRegistryInterface) FilterPriceFeedPerTokenUpdated(opts *bind.FilterOpts, token []common.Address) (*price_registry.PriceRegistryPriceFeedPerTokenUpdatedIterator, error) { ret := _m.Called(opts, token) @@ -434,6 +614,66 @@ func (_m *PriceRegistryInterface) FilterPriceUpdaterSet(opts *bind.FilterOpts, p return r0, r1 } +// FilterTokenTransferFeeConfigDeleted provides a mock function with given fields: opts, destChainSelector, token +func (_m *PriceRegistryInterface) FilterTokenTransferFeeConfigDeleted(opts *bind.FilterOpts, destChainSelector []uint64, token []common.Address) (*price_registry.PriceRegistryTokenTransferFeeConfigDeletedIterator, error) { + ret := _m.Called(opts, destChainSelector, token) + + if len(ret) == 0 { + panic("no return value specified for FilterTokenTransferFeeConfigDeleted") + } + + var r0 *price_registry.PriceRegistryTokenTransferFeeConfigDeletedIterator + var r1 error + if rf, ok := ret.Get(0).(func(*bind.FilterOpts, []uint64, []common.Address) (*price_registry.PriceRegistryTokenTransferFeeConfigDeletedIterator, error)); ok { + return rf(opts, destChainSelector, token) + } + if rf, ok := ret.Get(0).(func(*bind.FilterOpts, []uint64, []common.Address) *price_registry.PriceRegistryTokenTransferFeeConfigDeletedIterator); ok { + r0 = rf(opts, destChainSelector, token) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*price_registry.PriceRegistryTokenTransferFeeConfigDeletedIterator) + } + } + + if rf, ok := ret.Get(1).(func(*bind.FilterOpts, []uint64, []common.Address) error); ok { + r1 = rf(opts, destChainSelector, token) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// FilterTokenTransferFeeConfigUpdated provides a mock function with given fields: opts, destChainSelector, token +func (_m *PriceRegistryInterface) FilterTokenTransferFeeConfigUpdated(opts *bind.FilterOpts, destChainSelector []uint64, token []common.Address) (*price_registry.PriceRegistryTokenTransferFeeConfigUpdatedIterator, error) { + ret := _m.Called(opts, destChainSelector, token) + + if len(ret) == 0 { + panic("no return value specified for FilterTokenTransferFeeConfigUpdated") + } + + var r0 *price_registry.PriceRegistryTokenTransferFeeConfigUpdatedIterator + var r1 error + if rf, ok := ret.Get(0).(func(*bind.FilterOpts, []uint64, []common.Address) (*price_registry.PriceRegistryTokenTransferFeeConfigUpdatedIterator, error)); ok { + return rf(opts, destChainSelector, token) + } + if rf, ok := ret.Get(0).(func(*bind.FilterOpts, []uint64, []common.Address) *price_registry.PriceRegistryTokenTransferFeeConfigUpdatedIterator); ok { + r0 = rf(opts, destChainSelector, token) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*price_registry.PriceRegistryTokenTransferFeeConfigUpdatedIterator) + } + } + + if rf, ok := ret.Get(1).(func(*bind.FilterOpts, []uint64, []common.Address) error); ok { + r1 = rf(opts, destChainSelector, token) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + // FilterUsdPerTokenUpdated provides a mock function with given fields: opts, token func (_m *PriceRegistryInterface) FilterUsdPerTokenUpdated(opts *bind.FilterOpts, token []common.Address) (*price_registry.PriceRegistryUsdPerTokenUpdatedIterator, error) { ret := _m.Called(opts, token) @@ -524,6 +764,34 @@ func (_m *PriceRegistryInterface) GetAllAuthorizedCallers(opts *bind.CallOpts) ( return r0, r1 } +// GetDestChainDynamicConfig provides a mock function with given fields: opts, destChainSelector +func (_m *PriceRegistryInterface) GetDestChainDynamicConfig(opts *bind.CallOpts, destChainSelector uint64) (price_registry.PriceRegistryDestChainDynamicConfig, error) { + ret := _m.Called(opts, destChainSelector) + + if len(ret) == 0 { + panic("no return value specified for GetDestChainDynamicConfig") + } + + var r0 price_registry.PriceRegistryDestChainDynamicConfig + var r1 error + if rf, ok := ret.Get(0).(func(*bind.CallOpts, uint64) (price_registry.PriceRegistryDestChainDynamicConfig, error)); ok { + return rf(opts, destChainSelector) + } + if rf, ok := ret.Get(0).(func(*bind.CallOpts, uint64) price_registry.PriceRegistryDestChainDynamicConfig); ok { + r0 = rf(opts, destChainSelector) + } else { + r0 = ret.Get(0).(price_registry.PriceRegistryDestChainDynamicConfig) + } + + if rf, ok := ret.Get(1).(func(*bind.CallOpts, uint64) error); ok { + r1 = rf(opts, destChainSelector) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + // GetDestinationChainGasPrice provides a mock function with given fields: opts, destChainSelector func (_m *PriceRegistryInterface) GetDestinationChainGasPrice(opts *bind.CallOpts, destChainSelector uint64) (price_registry.InternalTimestampedPackedUint224, error) { ret := _m.Called(opts, destChainSelector) @@ -582,6 +850,34 @@ func (_m *PriceRegistryInterface) GetFeeTokens(opts *bind.CallOpts) ([]common.Ad return r0, r1 } +// GetPremiumMultiplierWeiPerEth provides a mock function with given fields: opts, token +func (_m *PriceRegistryInterface) GetPremiumMultiplierWeiPerEth(opts *bind.CallOpts, token common.Address) (uint64, error) { + ret := _m.Called(opts, token) + + if len(ret) == 0 { + panic("no return value specified for GetPremiumMultiplierWeiPerEth") + } + + var r0 uint64 + var r1 error + if rf, ok := ret.Get(0).(func(*bind.CallOpts, common.Address) (uint64, error)); ok { + return rf(opts, token) + } + if rf, ok := ret.Get(0).(func(*bind.CallOpts, common.Address) uint64); ok { + r0 = rf(opts, token) + } else { + r0 = ret.Get(0).(uint64) + } + + if rf, ok := ret.Get(1).(func(*bind.CallOpts, common.Address) error); ok { + r1 = rf(opts, token) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + // GetStalenessThreshold provides a mock function with given fields: opts func (_m *PriceRegistryInterface) GetStalenessThreshold(opts *bind.CallOpts) (*big.Int, error) { ret := _m.Called(opts) @@ -612,6 +908,34 @@ func (_m *PriceRegistryInterface) GetStalenessThreshold(opts *bind.CallOpts) (*b return r0, r1 } +// GetStaticConfig provides a mock function with given fields: opts +func (_m *PriceRegistryInterface) GetStaticConfig(opts *bind.CallOpts) (price_registry.PriceRegistryStaticConfig, error) { + ret := _m.Called(opts) + + if len(ret) == 0 { + panic("no return value specified for GetStaticConfig") + } + + var r0 price_registry.PriceRegistryStaticConfig + var r1 error + if rf, ok := ret.Get(0).(func(*bind.CallOpts) (price_registry.PriceRegistryStaticConfig, error)); ok { + return rf(opts) + } + if rf, ok := ret.Get(0).(func(*bind.CallOpts) price_registry.PriceRegistryStaticConfig); ok { + r0 = rf(opts) + } else { + r0 = ret.Get(0).(price_registry.PriceRegistryStaticConfig) + } + + if rf, ok := ret.Get(1).(func(*bind.CallOpts) error); ok { + r1 = rf(opts) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + // GetTokenAndGasPrices provides a mock function with given fields: opts, token, destChainSelector func (_m *PriceRegistryInterface) GetTokenAndGasPrices(opts *bind.CallOpts, token common.Address, destChainSelector uint64) (price_registry.GetTokenAndGasPrices, error) { ret := _m.Called(opts, token, destChainSelector) @@ -726,6 +1050,92 @@ func (_m *PriceRegistryInterface) GetTokenPrices(opts *bind.CallOpts, tokens []c return r0, r1 } +// GetTokenTransferFeeConfig provides a mock function with given fields: opts, destChainSelector, token +func (_m *PriceRegistryInterface) GetTokenTransferFeeConfig(opts *bind.CallOpts, destChainSelector uint64, token common.Address) (price_registry.PriceRegistryTokenTransferFeeConfig, error) { + ret := _m.Called(opts, destChainSelector, token) + + if len(ret) == 0 { + panic("no return value specified for GetTokenTransferFeeConfig") + } + + var r0 price_registry.PriceRegistryTokenTransferFeeConfig + var r1 error + if rf, ok := ret.Get(0).(func(*bind.CallOpts, uint64, common.Address) (price_registry.PriceRegistryTokenTransferFeeConfig, error)); ok { + return rf(opts, destChainSelector, token) + } + if rf, ok := ret.Get(0).(func(*bind.CallOpts, uint64, common.Address) price_registry.PriceRegistryTokenTransferFeeConfig); ok { + r0 = rf(opts, destChainSelector, token) + } else { + r0 = ret.Get(0).(price_registry.PriceRegistryTokenTransferFeeConfig) + } + + if rf, ok := ret.Get(1).(func(*bind.CallOpts, uint64, common.Address) error); ok { + r1 = rf(opts, destChainSelector, token) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// GetValidatedFee provides a mock function with given fields: opts, destChainSelector, message +func (_m *PriceRegistryInterface) GetValidatedFee(opts *bind.CallOpts, destChainSelector uint64, message price_registry.ClientEVM2AnyMessage) (*big.Int, error) { + ret := _m.Called(opts, destChainSelector, message) + + if len(ret) == 0 { + panic("no return value specified for GetValidatedFee") + } + + var r0 *big.Int + var r1 error + if rf, ok := ret.Get(0).(func(*bind.CallOpts, uint64, price_registry.ClientEVM2AnyMessage) (*big.Int, error)); ok { + return rf(opts, destChainSelector, message) + } + if rf, ok := ret.Get(0).(func(*bind.CallOpts, uint64, price_registry.ClientEVM2AnyMessage) *big.Int); ok { + r0 = rf(opts, destChainSelector, message) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*big.Int) + } + } + + if rf, ok := ret.Get(1).(func(*bind.CallOpts, uint64, price_registry.ClientEVM2AnyMessage) error); ok { + r1 = rf(opts, destChainSelector, message) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// GetValidatedRampMessageParams provides a mock function with given fields: opts, message, sourceTokenAmounts +func (_m *PriceRegistryInterface) GetValidatedRampMessageParams(opts *bind.CallOpts, message price_registry.InternalEVM2AnyRampMessage, sourceTokenAmounts []price_registry.ClientEVMTokenAmount) (price_registry.GetValidatedRampMessageParams, error) { + ret := _m.Called(opts, message, sourceTokenAmounts) + + if len(ret) == 0 { + panic("no return value specified for GetValidatedRampMessageParams") + } + + var r0 price_registry.GetValidatedRampMessageParams + var r1 error + if rf, ok := ret.Get(0).(func(*bind.CallOpts, price_registry.InternalEVM2AnyRampMessage, []price_registry.ClientEVMTokenAmount) (price_registry.GetValidatedRampMessageParams, error)); ok { + return rf(opts, message, sourceTokenAmounts) + } + if rf, ok := ret.Get(0).(func(*bind.CallOpts, price_registry.InternalEVM2AnyRampMessage, []price_registry.ClientEVMTokenAmount) price_registry.GetValidatedRampMessageParams); ok { + r0 = rf(opts, message, sourceTokenAmounts) + } else { + r0 = ret.Get(0).(price_registry.GetValidatedRampMessageParams) + } + + if rf, ok := ret.Get(1).(func(*bind.CallOpts, price_registry.InternalEVM2AnyRampMessage, []price_registry.ClientEVMTokenAmount) error); ok { + r1 = rf(opts, message, sourceTokenAmounts) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + // GetValidatedTokenPrice provides a mock function with given fields: opts, token func (_m *PriceRegistryInterface) GetValidatedTokenPrice(opts *bind.CallOpts, token common.Address) (*big.Int, error) { ret := _m.Called(opts, token) @@ -846,6 +1256,66 @@ func (_m *PriceRegistryInterface) ParseAuthorizedCallerRemoved(log types.Log) (* return r0, r1 } +// ParseDestChainAdded provides a mock function with given fields: log +func (_m *PriceRegistryInterface) ParseDestChainAdded(log types.Log) (*price_registry.PriceRegistryDestChainAdded, error) { + ret := _m.Called(log) + + if len(ret) == 0 { + panic("no return value specified for ParseDestChainAdded") + } + + var r0 *price_registry.PriceRegistryDestChainAdded + var r1 error + if rf, ok := ret.Get(0).(func(types.Log) (*price_registry.PriceRegistryDestChainAdded, error)); ok { + return rf(log) + } + if rf, ok := ret.Get(0).(func(types.Log) *price_registry.PriceRegistryDestChainAdded); ok { + r0 = rf(log) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*price_registry.PriceRegistryDestChainAdded) + } + } + + if rf, ok := ret.Get(1).(func(types.Log) error); ok { + r1 = rf(log) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// ParseDestChainDynamicConfigUpdated provides a mock function with given fields: log +func (_m *PriceRegistryInterface) ParseDestChainDynamicConfigUpdated(log types.Log) (*price_registry.PriceRegistryDestChainDynamicConfigUpdated, error) { + ret := _m.Called(log) + + if len(ret) == 0 { + panic("no return value specified for ParseDestChainDynamicConfigUpdated") + } + + var r0 *price_registry.PriceRegistryDestChainDynamicConfigUpdated + var r1 error + if rf, ok := ret.Get(0).(func(types.Log) (*price_registry.PriceRegistryDestChainDynamicConfigUpdated, error)); ok { + return rf(log) + } + if rf, ok := ret.Get(0).(func(types.Log) *price_registry.PriceRegistryDestChainDynamicConfigUpdated); ok { + r0 = rf(log) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*price_registry.PriceRegistryDestChainDynamicConfigUpdated) + } + } + + if rf, ok := ret.Get(1).(func(types.Log) error); ok { + r1 = rf(log) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + // ParseFeeTokenAdded provides a mock function with given fields: log func (_m *PriceRegistryInterface) ParseFeeTokenAdded(log types.Log) (*price_registry.PriceRegistryFeeTokenAdded, error) { ret := _m.Called(log) @@ -996,6 +1466,36 @@ func (_m *PriceRegistryInterface) ParseOwnershipTransferred(log types.Log) (*pri return r0, r1 } +// ParsePremiumMultiplierWeiPerEthUpdated provides a mock function with given fields: log +func (_m *PriceRegistryInterface) ParsePremiumMultiplierWeiPerEthUpdated(log types.Log) (*price_registry.PriceRegistryPremiumMultiplierWeiPerEthUpdated, error) { + ret := _m.Called(log) + + if len(ret) == 0 { + panic("no return value specified for ParsePremiumMultiplierWeiPerEthUpdated") + } + + var r0 *price_registry.PriceRegistryPremiumMultiplierWeiPerEthUpdated + var r1 error + if rf, ok := ret.Get(0).(func(types.Log) (*price_registry.PriceRegistryPremiumMultiplierWeiPerEthUpdated, error)); ok { + return rf(log) + } + if rf, ok := ret.Get(0).(func(types.Log) *price_registry.PriceRegistryPremiumMultiplierWeiPerEthUpdated); ok { + r0 = rf(log) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*price_registry.PriceRegistryPremiumMultiplierWeiPerEthUpdated) + } + } + + if rf, ok := ret.Get(1).(func(types.Log) error); ok { + r1 = rf(log) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + // ParsePriceFeedPerTokenUpdated provides a mock function with given fields: log func (_m *PriceRegistryInterface) ParsePriceFeedPerTokenUpdated(log types.Log) (*price_registry.PriceRegistryPriceFeedPerTokenUpdated, error) { ret := _m.Called(log) @@ -1086,6 +1586,66 @@ func (_m *PriceRegistryInterface) ParsePriceUpdaterSet(log types.Log) (*price_re return r0, r1 } +// ParseTokenTransferFeeConfigDeleted provides a mock function with given fields: log +func (_m *PriceRegistryInterface) ParseTokenTransferFeeConfigDeleted(log types.Log) (*price_registry.PriceRegistryTokenTransferFeeConfigDeleted, error) { + ret := _m.Called(log) + + if len(ret) == 0 { + panic("no return value specified for ParseTokenTransferFeeConfigDeleted") + } + + var r0 *price_registry.PriceRegistryTokenTransferFeeConfigDeleted + var r1 error + if rf, ok := ret.Get(0).(func(types.Log) (*price_registry.PriceRegistryTokenTransferFeeConfigDeleted, error)); ok { + return rf(log) + } + if rf, ok := ret.Get(0).(func(types.Log) *price_registry.PriceRegistryTokenTransferFeeConfigDeleted); ok { + r0 = rf(log) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*price_registry.PriceRegistryTokenTransferFeeConfigDeleted) + } + } + + if rf, ok := ret.Get(1).(func(types.Log) error); ok { + r1 = rf(log) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// ParseTokenTransferFeeConfigUpdated provides a mock function with given fields: log +func (_m *PriceRegistryInterface) ParseTokenTransferFeeConfigUpdated(log types.Log) (*price_registry.PriceRegistryTokenTransferFeeConfigUpdated, error) { + ret := _m.Called(log) + + if len(ret) == 0 { + panic("no return value specified for ParseTokenTransferFeeConfigUpdated") + } + + var r0 *price_registry.PriceRegistryTokenTransferFeeConfigUpdated + var r1 error + if rf, ok := ret.Get(0).(func(types.Log) (*price_registry.PriceRegistryTokenTransferFeeConfigUpdated, error)); ok { + return rf(log) + } + if rf, ok := ret.Get(0).(func(types.Log) *price_registry.PriceRegistryTokenTransferFeeConfigUpdated); ok { + r0 = rf(log) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*price_registry.PriceRegistryTokenTransferFeeConfigUpdated) + } + } + + if rf, ok := ret.Get(1).(func(types.Log) error); ok { + r1 = rf(log) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + // ParseUsdPerTokenUpdated provides a mock function with given fields: log func (_m *PriceRegistryInterface) ParseUsdPerTokenUpdated(log types.Log) (*price_registry.PriceRegistryUsdPerTokenUpdated, error) { ret := _m.Called(log) @@ -1324,6 +1884,66 @@ func (_m *PriceRegistryInterface) WatchAuthorizedCallerRemoved(opts *bind.WatchO return r0, r1 } +// WatchDestChainAdded provides a mock function with given fields: opts, sink, destChainSelector +func (_m *PriceRegistryInterface) WatchDestChainAdded(opts *bind.WatchOpts, sink chan<- *price_registry.PriceRegistryDestChainAdded, destChainSelector []uint64) (event.Subscription, error) { + ret := _m.Called(opts, sink, destChainSelector) + + if len(ret) == 0 { + panic("no return value specified for WatchDestChainAdded") + } + + var r0 event.Subscription + var r1 error + if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *price_registry.PriceRegistryDestChainAdded, []uint64) (event.Subscription, error)); ok { + return rf(opts, sink, destChainSelector) + } + if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *price_registry.PriceRegistryDestChainAdded, []uint64) event.Subscription); ok { + r0 = rf(opts, sink, destChainSelector) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(event.Subscription) + } + } + + if rf, ok := ret.Get(1).(func(*bind.WatchOpts, chan<- *price_registry.PriceRegistryDestChainAdded, []uint64) error); ok { + r1 = rf(opts, sink, destChainSelector) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// WatchDestChainDynamicConfigUpdated provides a mock function with given fields: opts, sink, destChainSelector +func (_m *PriceRegistryInterface) WatchDestChainDynamicConfigUpdated(opts *bind.WatchOpts, sink chan<- *price_registry.PriceRegistryDestChainDynamicConfigUpdated, destChainSelector []uint64) (event.Subscription, error) { + ret := _m.Called(opts, sink, destChainSelector) + + if len(ret) == 0 { + panic("no return value specified for WatchDestChainDynamicConfigUpdated") + } + + var r0 event.Subscription + var r1 error + if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *price_registry.PriceRegistryDestChainDynamicConfigUpdated, []uint64) (event.Subscription, error)); ok { + return rf(opts, sink, destChainSelector) + } + if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *price_registry.PriceRegistryDestChainDynamicConfigUpdated, []uint64) event.Subscription); ok { + r0 = rf(opts, sink, destChainSelector) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(event.Subscription) + } + } + + if rf, ok := ret.Get(1).(func(*bind.WatchOpts, chan<- *price_registry.PriceRegistryDestChainDynamicConfigUpdated, []uint64) error); ok { + r1 = rf(opts, sink, destChainSelector) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + // WatchFeeTokenAdded provides a mock function with given fields: opts, sink, feeToken func (_m *PriceRegistryInterface) WatchFeeTokenAdded(opts *bind.WatchOpts, sink chan<- *price_registry.PriceRegistryFeeTokenAdded, feeToken []common.Address) (event.Subscription, error) { ret := _m.Called(opts, sink, feeToken) @@ -1444,6 +2064,36 @@ func (_m *PriceRegistryInterface) WatchOwnershipTransferred(opts *bind.WatchOpts return r0, r1 } +// WatchPremiumMultiplierWeiPerEthUpdated provides a mock function with given fields: opts, sink, token +func (_m *PriceRegistryInterface) WatchPremiumMultiplierWeiPerEthUpdated(opts *bind.WatchOpts, sink chan<- *price_registry.PriceRegistryPremiumMultiplierWeiPerEthUpdated, token []common.Address) (event.Subscription, error) { + ret := _m.Called(opts, sink, token) + + if len(ret) == 0 { + panic("no return value specified for WatchPremiumMultiplierWeiPerEthUpdated") + } + + var r0 event.Subscription + var r1 error + if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *price_registry.PriceRegistryPremiumMultiplierWeiPerEthUpdated, []common.Address) (event.Subscription, error)); ok { + return rf(opts, sink, token) + } + if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *price_registry.PriceRegistryPremiumMultiplierWeiPerEthUpdated, []common.Address) event.Subscription); ok { + r0 = rf(opts, sink, token) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(event.Subscription) + } + } + + if rf, ok := ret.Get(1).(func(*bind.WatchOpts, chan<- *price_registry.PriceRegistryPremiumMultiplierWeiPerEthUpdated, []common.Address) error); ok { + r1 = rf(opts, sink, token) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + // WatchPriceFeedPerTokenUpdated provides a mock function with given fields: opts, sink, token func (_m *PriceRegistryInterface) WatchPriceFeedPerTokenUpdated(opts *bind.WatchOpts, sink chan<- *price_registry.PriceRegistryPriceFeedPerTokenUpdated, token []common.Address) (event.Subscription, error) { ret := _m.Called(opts, sink, token) @@ -1534,6 +2184,66 @@ func (_m *PriceRegistryInterface) WatchPriceUpdaterSet(opts *bind.WatchOpts, sin return r0, r1 } +// WatchTokenTransferFeeConfigDeleted provides a mock function with given fields: opts, sink, destChainSelector, token +func (_m *PriceRegistryInterface) WatchTokenTransferFeeConfigDeleted(opts *bind.WatchOpts, sink chan<- *price_registry.PriceRegistryTokenTransferFeeConfigDeleted, destChainSelector []uint64, token []common.Address) (event.Subscription, error) { + ret := _m.Called(opts, sink, destChainSelector, token) + + if len(ret) == 0 { + panic("no return value specified for WatchTokenTransferFeeConfigDeleted") + } + + var r0 event.Subscription + var r1 error + if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *price_registry.PriceRegistryTokenTransferFeeConfigDeleted, []uint64, []common.Address) (event.Subscription, error)); ok { + return rf(opts, sink, destChainSelector, token) + } + if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *price_registry.PriceRegistryTokenTransferFeeConfigDeleted, []uint64, []common.Address) event.Subscription); ok { + r0 = rf(opts, sink, destChainSelector, token) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(event.Subscription) + } + } + + if rf, ok := ret.Get(1).(func(*bind.WatchOpts, chan<- *price_registry.PriceRegistryTokenTransferFeeConfigDeleted, []uint64, []common.Address) error); ok { + r1 = rf(opts, sink, destChainSelector, token) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// WatchTokenTransferFeeConfigUpdated provides a mock function with given fields: opts, sink, destChainSelector, token +func (_m *PriceRegistryInterface) WatchTokenTransferFeeConfigUpdated(opts *bind.WatchOpts, sink chan<- *price_registry.PriceRegistryTokenTransferFeeConfigUpdated, destChainSelector []uint64, token []common.Address) (event.Subscription, error) { + ret := _m.Called(opts, sink, destChainSelector, token) + + if len(ret) == 0 { + panic("no return value specified for WatchTokenTransferFeeConfigUpdated") + } + + var r0 event.Subscription + var r1 error + if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *price_registry.PriceRegistryTokenTransferFeeConfigUpdated, []uint64, []common.Address) (event.Subscription, error)); ok { + return rf(opts, sink, destChainSelector, token) + } + if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *price_registry.PriceRegistryTokenTransferFeeConfigUpdated, []uint64, []common.Address) event.Subscription); ok { + r0 = rf(opts, sink, destChainSelector, token) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(event.Subscription) + } + } + + if rf, ok := ret.Get(1).(func(*bind.WatchOpts, chan<- *price_registry.PriceRegistryTokenTransferFeeConfigUpdated, []uint64, []common.Address) error); ok { + r1 = rf(opts, sink, destChainSelector, token) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + // WatchUsdPerTokenUpdated provides a mock function with given fields: opts, sink, token func (_m *PriceRegistryInterface) WatchUsdPerTokenUpdated(opts *bind.WatchOpts, sink chan<- *price_registry.PriceRegistryUsdPerTokenUpdated, token []common.Address) (event.Subscription, error) { ret := _m.Called(opts, sink, token)