From b2927a3199d78fdf7ab9a0c5c1e3dec5c1441d58 Mon Sep 17 00:00:00 2001 From: Justin Kaseman Date: Mon, 12 Feb 2024 10:25:51 -0800 Subject: [PATCH 01/19] FUN-1234 (feat): Chainlink Functions premium fees in USD denomination --- .../gas-snapshots/functions.gas-snapshot | 148 +- .../scripts/native_solc_compile_all_functions | 3 +- .../functions/dev/v1_X/FunctionsBilling.sol | 95 +- .../dev/v1_X/FunctionsCoordinator.sol | 37 +- .../dev/v1_X/interfaces/IFunctionsBilling.sol | 14 +- .../dev/v1_X/libraries/FunctionsResponse.sol | 16 + .../tests/v1_X/FunctionsBilling.t.sol | 111 +- .../tests/v1_X/FunctionsCoordinator.t.sol | 32 +- .../tests/v1_X/FunctionsRouter.t.sol | 34 +- .../src/v0.8/functions/tests/v1_X/Setup.t.sol | 94 +- .../FunctionsCoordinatorHarness.sol | 22 +- .../FunctionsCoordinatorTestHelper.sol | 24 +- .../functions/v1_1_0/FunctionsBilling.sol | 2 +- .../functions_coordinator.go | 87 +- .../functions_coordinator_1_1_0.go | 1965 +++++++++++++++++ ...rapper-dependency-versions-do-not-edit.txt | 3 +- core/gethwrappers/functions/go_generate.go | 1 + .../v1/internal/testutils.go | 11 +- .../relay/evm/functions/logpoller_wrapper.go | 423 +++- 19 files changed, 2802 insertions(+), 320 deletions(-) create mode 100644 core/gethwrappers/functions/generated/functions_coordinator_1_1_0/functions_coordinator_1_1_0.go diff --git a/contracts/gas-snapshots/functions.gas-snapshot b/contracts/gas-snapshots/functions.gas-snapshot index 279aa389e4f..c6fc3bca710 100644 --- a/contracts/gas-snapshots/functions.gas-snapshot +++ b/contracts/gas-snapshots/functions.gas-snapshot @@ -1,69 +1,71 @@ -ChainSpecificUtil__getCurrentTxL1GasFees_Arbitrum:test__getCurrentTxL1GasFees_SuccessWhenArbitrumGoerli() (gas: 14860808) -ChainSpecificUtil__getCurrentTxL1GasFees_Arbitrum:test__getCurrentTxL1GasFees_SuccessWhenArbitrumMainnet() (gas: 14860786) -ChainSpecificUtil__getCurrentTxL1GasFees_Arbitrum:test__getCurrentTxL1GasFees_SuccessWhenArbitrumSepolia() (gas: 14860802) -ChainSpecificUtil__getCurrentTxL1GasFees_Base:test__getCurrentTxL1GasFees_SuccessWhenBaseGoerli() (gas: 14872224) -ChainSpecificUtil__getCurrentTxL1GasFees_Base:test__getCurrentTxL1GasFees_SuccessWhenBaseMainnet() (gas: 14872201) -ChainSpecificUtil__getCurrentTxL1GasFees_Base:test__getCurrentTxL1GasFees_SuccessWhenBaseSepolia() (gas: 14872173) -ChainSpecificUtil__getCurrentTxL1GasFees_Optimism:test__getCurrentTxL1GasFees_SuccessWhenOptimismGoerli() (gas: 14872124) -ChainSpecificUtil__getCurrentTxL1GasFees_Optimism:test__getCurrentTxL1GasFees_SuccessWhenOptimismMainnet() (gas: 14872113) -ChainSpecificUtil__getCurrentTxL1GasFees_Optimism:test__getCurrentTxL1GasFees_SuccessWhenOptimismSepolia() (gas: 14872157) -FunctionsBilling_Constructor:test_Constructor_Success() (gas: 14812) +ChainSpecificUtil__getCurrentTxL1GasFees_Arbitrum:test__getCurrentTxL1GasFees_SuccessWhenArbitrumGoerli() (gas: 16276761) +ChainSpecificUtil__getCurrentTxL1GasFees_Arbitrum:test__getCurrentTxL1GasFees_SuccessWhenArbitrumMainnet() (gas: 16276739) +ChainSpecificUtil__getCurrentTxL1GasFees_Arbitrum:test__getCurrentTxL1GasFees_SuccessWhenArbitrumSepolia() (gas: 16276755) +ChainSpecificUtil__getCurrentTxL1GasFees_Base:test__getCurrentTxL1GasFees_SuccessWhenBaseGoerli() (gas: 16288311) +ChainSpecificUtil__getCurrentTxL1GasFees_Base:test__getCurrentTxL1GasFees_SuccessWhenBaseMainnet() (gas: 16288288) +ChainSpecificUtil__getCurrentTxL1GasFees_Base:test__getCurrentTxL1GasFees_SuccessWhenBaseSepolia() (gas: 16288260) +ChainSpecificUtil__getCurrentTxL1GasFees_Optimism:test__getCurrentTxL1GasFees_SuccessWhenOptimismGoerli() (gas: 16288211) +ChainSpecificUtil__getCurrentTxL1GasFees_Optimism:test__getCurrentTxL1GasFees_SuccessWhenOptimismMainnet() (gas: 16288200) +ChainSpecificUtil__getCurrentTxL1GasFees_Optimism:test__getCurrentTxL1GasFees_SuccessWhenOptimismSepolia() (gas: 16288244) +FunctionsBilling_Constructor:test_Constructor_Success() (gas: 14823) FunctionsBilling_DeleteCommitment:test_DeleteCommitment_RevertIfNotRouter() (gas: 13282) FunctionsBilling_DeleteCommitment:test_DeleteCommitment_Success() (gas: 15897) -FunctionsBilling_EstimateCost:test_EstimateCost_RevertsIfGasPriceAboveCeiling() (gas: 32414) -FunctionsBilling_EstimateCost:test_EstimateCost_Success() (gas: 53763) -FunctionsBilling_EstimateCost:test_EstimateCost_SuccessLowGasPrice() (gas: 53866) -FunctionsBilling_GetAdminFee:test_GetAdminFee_Success() (gas: 18226) -FunctionsBilling_GetConfig:test_GetConfig_Success() (gas: 23693) -FunctionsBilling_GetDONFee:test_GetDONFee_Success() (gas: 15792) -FunctionsBilling_GetWeiPerUnitLink:test_GetWeiPerUnitLink_Success() (gas: 31773) -FunctionsBilling_OracleWithdraw:test_OracleWithdraw_RevertIfInsufficientBalance() (gas: 70128) -FunctionsBilling_OracleWithdraw:test_OracleWithdraw_RevertWithNoBalance() (gas: 106285) -FunctionsBilling_OracleWithdraw:test_OracleWithdraw_SuccessTransmitterWithBalanceNoAmountGiven() (gas: 140164) -FunctionsBilling_OracleWithdraw:test_OracleWithdraw_SuccessTransmitterWithBalanceValidAmountGiven() (gas: 142492) -FunctionsBilling_OracleWithdrawAll:test_OracleWithdrawAll_RevertIfNotOwner() (gas: 13296) -FunctionsBilling_OracleWithdrawAll:test_OracleWithdrawAll_SuccessPaysTransmittersWithBalance() (gas: 147278) -FunctionsBilling_UpdateConfig:test_UpdateConfig_RevertIfNotOwner() (gas: 18974) -FunctionsBilling_UpdateConfig:test_UpdateConfig_Success() (gas: 38273) -FunctionsBilling__DisperseFeePool:test__DisperseFeePool_RevertIfNotSet() (gas: 8810) -FunctionsBilling__FulfillAndBill:test__FulfillAndBill_RevertIfInvalidCommitment() (gas: 13302) -FunctionsBilling__FulfillAndBill:test__FulfillAndBill_Success() (gas: 180763) -FunctionsBilling__StartBilling:test__FulfillAndBill_HasUniqueGlobalRequestId() (gas: 398400) +FunctionsBilling_EstimateCost:test_EstimateCost_RevertsIfGasPriceAboveCeiling() (gas: 32436) +FunctionsBilling_EstimateCost:test_EstimateCost_Success() (gas: 93245) +FunctionsBilling_EstimateCost:test_EstimateCost_SuccessLowGasPrice() (gas: 93348) +FunctionsBilling_GetAdminFee:test_GetAdminFee_Success() (gas: 18292) +FunctionsBilling_GetConfig:test_GetConfig_Success() (gas: 27535) +FunctionsBilling_GetDONFee:test_GetDONFee_Success() (gas: 43496) +FunctionsBilling_GetOperationFee:test_GetOperationFee_Success() (gas: 42764) +FunctionsBilling_GetWeiPerUnitLink:test_GetWeiPerUnitLink_Success() (gas: 33951) +FunctionsBilling_OracleWithdraw:test_OracleWithdraw_RevertIfInsufficientBalance() (gas: 70084) +FunctionsBilling_OracleWithdraw:test_OracleWithdraw_RevertWithNoBalance() (gas: 106241) +FunctionsBilling_OracleWithdraw:test_OracleWithdraw_SuccessCoordinatorOwner() (gas: 132161) +FunctionsBilling_OracleWithdraw:test_OracleWithdraw_SuccessTransmitterWithBalanceNoAmountGiven() (gas: 172480) +FunctionsBilling_OracleWithdraw:test_OracleWithdraw_SuccessTransmitterWithBalanceValidAmountGiven() (gas: 142453) +FunctionsBilling_OracleWithdrawAll:test_OracleWithdrawAll_RevertIfNotOwner() (gas: 13319) +FunctionsBilling_OracleWithdrawAll:test_OracleWithdrawAll_SuccessPaysTransmittersWithBalance() (gas: 220452) +FunctionsBilling_UpdateConfig:test_UpdateConfig_RevertIfNotOwner() (gas: 21599) +FunctionsBilling_UpdateConfig:test_UpdateConfig_Success() (gas: 48669) +FunctionsBilling__DisperseFeePool:test__DisperseFeePool_RevertIfNotSet() (gas: 8832) +FunctionsBilling__FulfillAndBill:test__FulfillAndBill_RevertIfInvalidCommitment() (gas: 13332) +FunctionsBilling__FulfillAndBill:test__FulfillAndBill_Success() (gas: 212619) +FunctionsBilling__StartBilling:test__FulfillAndBill_HasUniqueGlobalRequestId() (gas: 546388) FunctionsClient_Constructor:test_Constructor_Success() (gas: 7573) -FunctionsClient_HandleOracleFulfillment:test_HandleOracleFulfillment_RevertIfNotRouter() (gas: 14623) -FunctionsClient_HandleOracleFulfillment:test_HandleOracleFulfillment_Success() (gas: 22923) +FunctionsClient_HandleOracleFulfillment:test_HandleOracleFulfillment_RevertIfNotRouter() (gas: 14617) +FunctionsClient_HandleOracleFulfillment:test_HandleOracleFulfillment_Success() (gas: 22917) FunctionsClient__SendRequest:test__SendRequest_RevertIfInvalidCallbackGasLimit() (gas: 55059) -FunctionsCoordinator_Constructor:test_Constructor_Success() (gas: 12006) -FunctionsCoordinator_GetDONPublicKey:test_GetDONPublicKey_RevertIfEmpty() (gas: 15356) +FunctionsCoordinator_Constructor:test_Constructor_Success() (gas: 12029) +FunctionsCoordinator_GetDONPublicKey:test_GetDONPublicKey_RevertIfEmpty() (gas: 15378) FunctionsCoordinator_GetDONPublicKey:test_GetDONPublicKey_Success() (gas: 106528) -FunctionsCoordinator_GetThresholdPublicKey:test_GetThresholdPublicKey_RevertIfEmpty() (gas: 15313) -FunctionsCoordinator_GetThresholdPublicKey:test_GetThresholdPublicKey_Success() (gas: 656362) -FunctionsCoordinator_SetDONPublicKey:test_SetDONPublicKey_RevertNotOwner() (gas: 20364) +FunctionsCoordinator_GetThresholdPublicKey:test_GetThresholdPublicKey_RevertIfEmpty() (gas: 15378) +FunctionsCoordinator_GetThresholdPublicKey:test_GetThresholdPublicKey_Success() (gas: 656427) +FunctionsCoordinator_SetDONPublicKey:test_SetDONPublicKey_RevertNotOwner() (gas: 20342) FunctionsCoordinator_SetDONPublicKey:test_SetDONPublicKey_Success() (gas: 101307) FunctionsCoordinator_SetThresholdPublicKey:test_SetThresholdPublicKey_RevertNotOwner() (gas: 13892) -FunctionsCoordinator_SetThresholdPublicKey:test_SetThresholdPublicKey_Success() (gas: 651054) -FunctionsCoordinator_StartRequest:test_StartRequest_RevertIfNotRouter() (gas: 22703) -FunctionsCoordinator_StartRequest:test_StartRequest_Success() (gas: 108804) -FunctionsCoordinator__IsTransmitter:test__IsTransmitter_SuccessFound() (gas: 18957) -FunctionsCoordinator__IsTransmitter:test__IsTransmitter_SuccessNotFound() (gas: 19690) +FunctionsCoordinator_SetThresholdPublicKey:test_SetThresholdPublicKey_Success() (gas: 651119) +FunctionsCoordinator_StartRequest:test_StartRequest_RevertIfNotRouter() (gas: 22726) +FunctionsCoordinator_StartRequest:test_StartRequest_Success() (gas: 156374) +FunctionsCoordinator__IsTransmitter:test__IsTransmitter_SuccessFound() (gas: 18980) +FunctionsCoordinator__IsTransmitter:test__IsTransmitter_SuccessNotFound() (gas: 19713) FunctionsRequest_DEFAULT_BUFFER_SIZE:test_DEFAULT_BUFFER_SIZE() (gas: 246) FunctionsRequest_EncodeCBOR:test_EncodeCBOR_Success() (gas: 223) FunctionsRequest_REQUEST_DATA_VERSION:test_REQUEST_DATA_VERSION() (gas: 225) FunctionsRouter_Constructor:test_Constructor_Success() (gas: 12007) -FunctionsRouter_Fulfill:test_Fulfill_RequestNotProcessedCostExceedsCommitment() (gas: 169829) -FunctionsRouter_Fulfill:test_Fulfill_RequestNotProcessedInsufficientGas() (gas: 160160) +FunctionsRouter_Fulfill:test_Fulfill_RequestNotProcessedCostExceedsCommitment() (gas: 180658) +FunctionsRouter_Fulfill:test_Fulfill_RequestNotProcessedInsufficientGas() (gas: 171131) FunctionsRouter_Fulfill:test_Fulfill_RequestNotProcessedInvalidCommitment() (gas: 38115) FunctionsRouter_Fulfill:test_Fulfill_RequestNotProcessedInvalidRequestId() (gas: 35238) -FunctionsRouter_Fulfill:test_Fulfill_RequestNotProcessedSubscriptionBalanceInvariant() (gas: 178305) +FunctionsRouter_Fulfill:test_Fulfill_RequestNotProcessedSubscriptionBalanceInvariant() (gas: 189134) FunctionsRouter_Fulfill:test_Fulfill_RevertIfNotCommittedCoordinator() (gas: 28086) -FunctionsRouter_Fulfill:test_Fulfill_RevertIfPaused() (gas: 153867) -FunctionsRouter_Fulfill:test_Fulfill_SuccessClientNoLongerExists() (gas: 321317) -FunctionsRouter_Fulfill:test_Fulfill_SuccessFulfilled() (gas: 334938) -FunctionsRouter_Fulfill:test_Fulfill_SuccessUserCallbackReverts() (gas: 2510364) -FunctionsRouter_Fulfill:test_Fulfill_SuccessUserCallbackRunsOutOfGas() (gas: 540803) -FunctionsRouter_GetAdminFee:test_GetAdminFee_Success() (gas: 17983) +FunctionsRouter_Fulfill:test_Fulfill_RevertIfPaused() (gas: 164696) +FunctionsRouter_Fulfill:test_Fulfill_SuccessClientNoLongerExists() (gas: 362339) +FunctionsRouter_Fulfill:test_Fulfill_SuccessFulfilled() (gas: 375963) +FunctionsRouter_Fulfill:test_Fulfill_SuccessUserCallbackReverts() (gas: 2675587) +FunctionsRouter_Fulfill:test_Fulfill_SuccessUserCallbackRunsOutOfGas() (gas: 706537) +FunctionsRouter_GetAdminFee:test_GetAdminFee_Success() (gas: 20072) FunctionsRouter_GetAllowListId:test_GetAllowListId_Success() (gas: 12904) -FunctionsRouter_GetConfig:test_GetConfig_Success() (gas: 37159) +FunctionsRouter_GetConfig:test_GetConfig_Success() (gas: 39960) FunctionsRouter_GetContractById:test_GetContractById_RevertIfRouteDoesNotExist() (gas: 13849) FunctionsRouter_GetContractById:test_GetContractById_SuccessIfRouteExists() (gas: 17373) FunctionsRouter_GetProposedContractById:test_GetProposedContractById_RevertIfRouteDoesNotExist() (gas: 16383) @@ -71,7 +73,7 @@ FunctionsRouter_GetProposedContractById:test_GetProposedContractById_SuccessIfRo FunctionsRouter_GetProposedContractSet:test_GetProposedContractSet_Success() (gas: 25936) FunctionsRouter_IsValidCallbackGasLimit:test_IsValidCallbackGasLimit_RevertGasLimitTooBig() (gas: 28103) FunctionsRouter_IsValidCallbackGasLimit:test_IsValidCallbackGasLimit_RevertInvalidConfig() (gas: 41093) -FunctionsRouter_IsValidCallbackGasLimit:test_IsValidCallbackGasLimit_Success() (gas: 24626) +FunctionsRouter_IsValidCallbackGasLimit:test_IsValidCallbackGasLimit_Success() (gas: 24620) FunctionsRouter_Pause:test_Pause_RevertIfNotOwner() (gas: 13338) FunctionsRouter_Pause:test_Pause_Success() (gas: 20344) FunctionsRouter_ProposeContractsUpdate:test_ProposeContractsUpdate_RevertIfEmptyAddress() (gas: 14791) @@ -81,15 +83,15 @@ FunctionsRouter_ProposeContractsUpdate:test_ProposeContractsUpdate_RevertIfNotNe FunctionsRouter_ProposeContractsUpdate:test_ProposeContractsUpdate_RevertIfNotOwner() (gas: 23392) FunctionsRouter_ProposeContractsUpdate:test_ProposeContractsUpdate_Success() (gas: 118479) FunctionsRouter_SendRequest:test_SendRequest_RevertIfConsumerNotAllowed() (gas: 59391) -FunctionsRouter_SendRequest:test_SendRequest_RevertIfDuplicateRequestId() (gas: 193436) +FunctionsRouter_SendRequest:test_SendRequest_RevertIfDuplicateRequestId() (gas: 220544) FunctionsRouter_SendRequest:test_SendRequest_RevertIfEmptyData() (gas: 29426) FunctionsRouter_SendRequest:test_SendRequest_RevertIfIncorrectDonId() (gas: 57904) -FunctionsRouter_SendRequest:test_SendRequest_RevertIfInsufficientSubscriptionBalance() (gas: 187020) +FunctionsRouter_SendRequest:test_SendRequest_RevertIfInsufficientSubscriptionBalance() (gas: 212929) FunctionsRouter_SendRequest:test_SendRequest_RevertIfInvalidCallbackGasLimit() (gas: 50947) FunctionsRouter_SendRequest:test_SendRequest_RevertIfInvalidDonId() (gas: 25082) FunctionsRouter_SendRequest:test_SendRequest_RevertIfNoSubscription() (gas: 29132) FunctionsRouter_SendRequest:test_SendRequest_RevertIfPaused() (gas: 34291) -FunctionsRouter_SendRequest:test_SendRequest_Success() (gas: 286199) +FunctionsRouter_SendRequest:test_SendRequest_Success() (gas: 322092) FunctionsRouter_SendRequestToProposed:test_SendRequestToProposed_RevertIfConsumerNotAllowed() (gas: 65887) FunctionsRouter_SendRequestToProposed:test_SendRequestToProposed_RevertIfEmptyData() (gas: 36012) FunctionsRouter_SendRequestToProposed:test_SendRequestToProposed_RevertIfIncorrectDonId() (gas: 29896) @@ -97,8 +99,8 @@ FunctionsRouter_SendRequestToProposed:test_SendRequestToProposed_RevertIfInvalid FunctionsRouter_SendRequestToProposed:test_SendRequestToProposed_RevertIfInvalidDonId() (gas: 27503) FunctionsRouter_SendRequestToProposed:test_SendRequestToProposed_RevertIfNoSubscription() (gas: 35717) FunctionsRouter_SendRequestToProposed:test_SendRequestToProposed_RevertIfPaused() (gas: 40810) -FunctionsRouter_SendRequestToProposed:test_SendRequestToProposed_Success() (gas: 292746) -FunctionsRouter_SendRequestToProposed:test_SendRequest_RevertIfInsufficientSubscriptionBalance() (gas: 193512) +FunctionsRouter_SendRequestToProposed:test_SendRequestToProposed_Success() (gas: 328539) +FunctionsRouter_SendRequestToProposed:test_SendRequest_RevertIfInsufficientSubscriptionBalance() (gas: 219376) FunctionsRouter_SetAllowListId:test_SetAllowListId_Success() (gas: 30688) FunctionsRouter_SetAllowListId:test_UpdateConfig_RevertIfNotOwner() (gas: 13403) FunctionsRouter_Unpause:test_Unpause_RevertIfNotOwner() (gas: 13293) @@ -111,9 +113,9 @@ FunctionsSubscriptions_AcceptSubscriptionOwnerTransfer:test_AcceptSubscriptionOw FunctionsSubscriptions_AcceptSubscriptionOwnerTransfer:test_AcceptSubscriptionOwnerTransfer_RevertIfPaused() (gas: 61031) FunctionsSubscriptions_AcceptSubscriptionOwnerTransfer:test_AcceptSubscriptionOwnerTransfer_RevertIfSenderBecomesBlocked() (gas: 139404) FunctionsSubscriptions_AcceptSubscriptionOwnerTransfer:test_AcceptSubscriptionOwnerTransfer_RevertIfSenderIsNotNewOwner() (gas: 62781) -FunctionsSubscriptions_AcceptSubscriptionOwnerTransfer:test_AcceptSubscriptionOwnerTransfer_Success() (gas: 215285) +FunctionsSubscriptions_AcceptSubscriptionOwnerTransfer:test_AcceptSubscriptionOwnerTransfer_Success() (gas: 241969) FunctionsSubscriptions_AddConsumer:test_AddConsumer_RevertIfMaximumConsumers() (gas: 138025) -FunctionsSubscriptions_AddConsumer:test_AddConsumer_RevertIfMaximumConsumersAfterConfigUpdate() (gas: 164969) +FunctionsSubscriptions_AddConsumer:test_AddConsumer_RevertIfMaximumConsumersAfterConfigUpdate() (gas: 167058) FunctionsSubscriptions_AddConsumer:test_AddConsumer_RevertIfNoSubscription() (gas: 12946) FunctionsSubscriptions_AddConsumer:test_AddConsumer_RevertIfNotAllowedSender() (gas: 102448) FunctionsSubscriptions_AddConsumer:test_AddConsumer_RevertIfNotSubscriptionOwner() (gas: 87199) @@ -123,9 +125,9 @@ FunctionsSubscriptions_CancelSubscription:test_CancelSubscription_RevertIfNoSubs FunctionsSubscriptions_CancelSubscription:test_CancelSubscription_RevertIfNotAllowedSender() (gas: 102524) FunctionsSubscriptions_CancelSubscription:test_CancelSubscription_RevertIfNotSubscriptionOwner() (gas: 89309) FunctionsSubscriptions_CancelSubscription:test_CancelSubscription_RevertIfPaused() (gas: 20148) -FunctionsSubscriptions_CancelSubscription:test_CancelSubscription_RevertIfPendingRequests() (gas: 194369) -FunctionsSubscriptions_CancelSubscription:test_CancelSubscription_SuccessForfeitAllBalanceAsDeposit() (gas: 114541) -FunctionsSubscriptions_CancelSubscription:test_CancelSubscription_SuccessForfeitSomeBalanceAsDeposit() (gas: 125867) +FunctionsSubscriptions_CancelSubscription:test_CancelSubscription_RevertIfPendingRequests() (gas: 221053) +FunctionsSubscriptions_CancelSubscription:test_CancelSubscription_SuccessForfeitAllBalanceAsDeposit() (gas: 114532) +FunctionsSubscriptions_CancelSubscription:test_CancelSubscription_SuccessForfeitSomeBalanceAsDeposit() (gas: 125845) FunctionsSubscriptions_CancelSubscription_ReceiveDeposit:test_CancelSubscription_SuccessRecieveDeposit() (gas: 75017) FunctionsSubscriptions_Constructor:test_Constructor_Success() (gas: 7654) FunctionsSubscriptions_CreateSubscriptionWithConsumer:test_CreateSubscriptionWithConsumer_RevertIfNotAllowedSender() (gas: 28704) @@ -156,7 +158,7 @@ FunctionsSubscriptions_OwnerCancelSubscription:test_OwnerCancelSubscription_Reve FunctionsSubscriptions_OwnerCancelSubscription:test_OwnerCancelSubscription_Success() (gas: 54867) FunctionsSubscriptions_OwnerCancelSubscription:test_OwnerCancelSubscription_SuccessDeletesSubscription() (gas: 49607) FunctionsSubscriptions_OwnerCancelSubscription:test_OwnerCancelSubscription_SuccessSubOwnerRefunded() (gas: 50896) -FunctionsSubscriptions_OwnerCancelSubscription:test_OwnerCancelSubscription_SuccessWhenRequestInFlight() (gas: 164812) +FunctionsSubscriptions_OwnerCancelSubscription:test_OwnerCancelSubscription_SuccessWhenRequestInFlight() (gas: 189257) FunctionsSubscriptions_OwnerWithdraw:test_OwnerWithdraw_RevertIfAmountMoreThanBalance() (gas: 17924) FunctionsSubscriptions_OwnerWithdraw:test_OwnerWithdraw_RevertIfBalanceInvariant() (gas: 210) FunctionsSubscriptions_OwnerWithdraw:test_OwnerWithdraw_RevertIfNotOwner() (gas: 15555) @@ -165,7 +167,7 @@ FunctionsSubscriptions_OwnerWithdraw:test_OwnerWithdraw_SuccessIfRecipientAddres FunctionsSubscriptions_OwnerWithdraw:test_OwnerWithdraw_SuccessPaysRecipient() (gas: 54413) FunctionsSubscriptions_OwnerWithdraw:test_OwnerWithdraw_SuccessSetsBalanceToZero() (gas: 37790) FunctionsSubscriptions_PendingRequestExists:test_PendingRequestExists_SuccessFalseIfNoPendingRequests() (gas: 14981) -FunctionsSubscriptions_PendingRequestExists:test_PendingRequestExists_SuccessTrueIfPendingRequests() (gas: 176478) +FunctionsSubscriptions_PendingRequestExists:test_PendingRequestExists_SuccessTrueIfPendingRequests() (gas: 203178) FunctionsSubscriptions_ProposeSubscriptionOwnerTransfer:test_ProposeSubscriptionOwnerTransfer_RevertIfEmptyNewOwner() (gas: 27655) FunctionsSubscriptions_ProposeSubscriptionOwnerTransfer:test_ProposeSubscriptionOwnerTransfer_RevertIfInvalidNewOwner() (gas: 57797) FunctionsSubscriptions_ProposeSubscriptionOwnerTransfer:test_ProposeSubscriptionOwnerTransfer_RevertIfNoSubscription() (gas: 15001) @@ -181,7 +183,7 @@ FunctionsSubscriptions_RemoveConsumer:test_RemoveConsumer_RevertIfNoSubscription FunctionsSubscriptions_RemoveConsumer:test_RemoveConsumer_RevertIfNotAllowedSender() (gas: 102439) FunctionsSubscriptions_RemoveConsumer:test_RemoveConsumer_RevertIfNotSubscriptionOwner() (gas: 87245) FunctionsSubscriptions_RemoveConsumer:test_RemoveConsumer_RevertIfPaused() (gas: 18049) -FunctionsSubscriptions_RemoveConsumer:test_RemoveConsumer_RevertIfPendingRequests() (gas: 191894) +FunctionsSubscriptions_RemoveConsumer:test_RemoveConsumer_RevertIfPendingRequests() (gas: 218586) FunctionsSubscriptions_RemoveConsumer:test_RemoveConsumer_Success() (gas: 42023) FunctionsSubscriptions_SetFlags:test_SetFlags_RevertIfNoSubscription() (gas: 12891) FunctionsSubscriptions_SetFlags:test_SetFlags_RevertIfNotOwner() (gas: 15684) @@ -206,12 +208,12 @@ FunctionsTermsOfServiceAllowList_BlockSender:test_BlockSender_Success() (gas: 96 FunctionsTermsOfServiceAllowList_Constructor:test_Constructor_Success() (gas: 12253) FunctionsTermsOfServiceAllowList_GetAllAllowedSenders:test_GetAllAllowedSenders_Success() (gas: 19199) FunctionsTermsOfServiceAllowList_GetAllowedSendersCount:test_GetAllowedSendersCount_Success() (gas: 12995) -FunctionsTermsOfServiceAllowList_GetAllowedSendersInRange:test_GetAllowedSendersInRange_RevertIfAllowedSendersIsEmpty() (gas: 12239111) +FunctionsTermsOfServiceAllowList_GetAllowedSendersInRange:test_GetAllowedSendersInRange_RevertIfAllowedSendersIsEmpty() (gas: 13462154) FunctionsTermsOfServiceAllowList_GetAllowedSendersInRange:test_GetAllowedSendersInRange_RevertIfEndIsAfterLastAllowedSender() (gas: 16571) FunctionsTermsOfServiceAllowList_GetAllowedSendersInRange:test_GetAllowedSendersInRange_RevertIfStartIsAfterEnd() (gas: 13301) FunctionsTermsOfServiceAllowList_GetAllowedSendersInRange:test_GetAllowedSendersInRange_Success() (gas: 20448) FunctionsTermsOfServiceAllowList_GetBlockedSendersCount:test_GetBlockedSendersCount_Success() (gas: 12931) -FunctionsTermsOfServiceAllowList_GetBlockedSendersInRange:test_GetBlockedSendersInRange_RevertIfAllowedSendersIsEmpty() (gas: 12239115) +FunctionsTermsOfServiceAllowList_GetBlockedSendersInRange:test_GetBlockedSendersInRange_RevertIfAllowedSendersIsEmpty() (gas: 13462158) FunctionsTermsOfServiceAllowList_GetBlockedSendersInRange:test_GetBlockedSendersInRange_RevertIfEndIsAfterLastAllowedSender() (gas: 16549) FunctionsTermsOfServiceAllowList_GetBlockedSendersInRange:test_GetBlockedSendersInRange_RevertIfStartIsAfterEnd() (gas: 13367) FunctionsTermsOfServiceAllowList_GetBlockedSendersInRange:test_GetBlockedSendersInRange_Success() (gas: 18493) @@ -228,10 +230,10 @@ FunctionsTermsOfServiceAllowList_UpdateConfig:test_UpdateConfig_Success() (gas: Gas_AcceptTermsOfService:test_AcceptTermsOfService_Gas() (gas: 84702) Gas_AddConsumer:test_AddConsumer_Gas() (gas: 79131) Gas_CreateSubscription:test_CreateSubscription_Gas() (gas: 73419) -Gas_FulfillRequest_DuplicateRequestID:test_FulfillRequest_DuplicateRequestID_MaximumGas() (gas: 20695) -Gas_FulfillRequest_DuplicateRequestID:test_FulfillRequest_DuplicateRequestID_MinimumGas() (gas: 20135) -Gas_FulfillRequest_Success:test_FulfillRequest_Success_MaximumGas() (gas: 498083) -Gas_FulfillRequest_Success:test_FulfillRequest_Success_MinimumGas() (gas: 199286) +Gas_FulfillRequest_DuplicateRequestID:test_FulfillRequest_DuplicateRequestID_MaximumGas() (gas: 20819) +Gas_FulfillRequest_DuplicateRequestID:test_FulfillRequest_DuplicateRequestID_MinimumGas() (gas: 20259) +Gas_FulfillRequest_Success:test_FulfillRequest_Success_MaximumGas() (gas: 527171) +Gas_FulfillRequest_Success:test_FulfillRequest_Success_MinimumGas() (gas: 228372) Gas_FundSubscription:test_FundSubscription_Gas() (gas: 38546) -Gas_SendRequest:test_SendRequest_MaximumGas() (gas: 979631) -Gas_SendRequest:test_SendRequest_MinimumGas() (gas: 157578) \ No newline at end of file +Gas_SendRequest:test_SendRequest_MaximumGas() (gas: 1006818) +Gas_SendRequest:test_SendRequest_MinimumGas() (gas: 184262) \ No newline at end of file diff --git a/contracts/scripts/native_solc_compile_all_functions b/contracts/scripts/native_solc_compile_all_functions index 26e4c0c6e50..8998a4d9ce4 100755 --- a/contracts/scripts/native_solc_compile_all_functions +++ b/contracts/scripts/native_solc_compile_all_functions @@ -33,7 +33,8 @@ export SOLC_VERSION=$SOLC_VERSION compileContract v1_X dev/v1_X/libraries/FunctionsRequest.sol compileContract v1_X dev/v1_X/FunctionsRouter.sol -compileContract v1_X dev/v1_X/FunctionsCoordinator.sol +compileContract v1_X dev/v1_X/FunctionsCoordinator.sol # Latest +compileContract v1_1_0 v1_1_0/FunctionsCoordinator.sol # Coordinator v1.1.0 compileContract v1_X dev/v1_X/accessControl/TermsOfServiceAllowList.sol compileContract v1_X dev/v1_X/example/FunctionsClientExample.sol diff --git a/contracts/src/v0.8/functions/dev/v1_X/FunctionsBilling.sol b/contracts/src/v0.8/functions/dev/v1_X/FunctionsBilling.sol index 3abfd893186..eccbf6a7b51 100644 --- a/contracts/src/v0.8/functions/dev/v1_X/FunctionsBilling.sol +++ b/contracts/src/v0.8/functions/dev/v1_X/FunctionsBilling.sol @@ -17,6 +17,7 @@ import {ChainSpecificUtil} from "./libraries/ChainSpecificUtil.sol"; abstract contract FunctionsBilling is Routable, IFunctionsBilling { using FunctionsResponse for FunctionsResponse.RequestMeta; using FunctionsResponse for FunctionsResponse.Commitment; + using FunctionsResponse for FunctionsResponse.CommitmentWithOperationFee; using FunctionsResponse for FunctionsResponse.FulfillResult; uint256 private constant REASONABLE_GAS_PRICE_CEILING = 1_000_000_000_000_000; // 1 million gwei @@ -26,7 +27,9 @@ abstract contract FunctionsBilling is Routable, IFunctionsBilling { uint96 juelsPerGas, uint256 l1FeeShareWei, uint96 callbackCostJuels, - uint96 totalCostJuels + uint72 donFee, + uint72 adminFee, + uint72 operationFee ); // ================================================================ @@ -47,6 +50,7 @@ abstract contract FunctionsBilling is Routable, IFunctionsBilling { error UnauthorizedSender(); error MustBeSubOwner(address owner); error InvalidLinkWeiPrice(int256 linkWei); + error InvalidUsdLinkPrice(int256 usdLink); error PaymentTooLarge(); error NoTransmittersSet(); error InvalidCalldata(); @@ -61,12 +65,19 @@ abstract contract FunctionsBilling is Routable, IFunctionsBilling { uint96 internal s_feePool; AggregatorV3Interface private s_linkToNativeFeed; + AggregatorV3Interface private s_linkToUsdFeed; // ================================================================ // | Initialization | // ================================================================ - constructor(address router, FunctionsBillingConfig memory config, address linkToNativeFeed) Routable(router) { + constructor( + address router, + FunctionsBillingConfig memory config, + address linkToNativeFeed, + address linkToUsdFeed + ) Routable(router) { s_linkToNativeFeed = AggregatorV3Interface(linkToNativeFeed); + s_linkToUsdFeed = AggregatorV3Interface(linkToUsdFeed); updateConfig(config); } @@ -96,7 +107,14 @@ abstract contract FunctionsBilling is Routable, IFunctionsBilling { /// @inheritdoc IFunctionsBilling function getDONFee(bytes memory /* requestData */) public view override returns (uint72) { - return s_config.donFee; + // s_config.donFee is in cents of USD. Get Juel amount then convert to dollars. + return SafeCast.toUint72(_getJuelsFromUsd(s_config.donFee) / 100); + } + + /// @inheritdoc IFunctionsBilling + function getOperationFee() public view override returns (uint72) { + // s_config.donFee is in cents of USD. Get Juel amount then convert to dollars. + return SafeCast.toUint72(_getJuelsFromUsd(s_config.operationFee) / 100); } /// @inheritdoc IFunctionsBilling @@ -124,6 +142,27 @@ abstract contract FunctionsBilling is Routable, IFunctionsBilling { return SafeCast.toUint96((1e18 * amountWei) / getWeiPerUnitLink()); } + /// @inheritdoc IFunctionsBilling + function getUsdPerUnitLink() public view returns (uint256, uint8) { + FunctionsBillingConfig memory config = s_config; + (, int256 usdPerUnitLink, , uint256 timestamp, ) = s_linkToUsdFeed.latestRoundData(); + // solhint-disable-next-line not-rely-on-time + if (config.feedStalenessSeconds < block.timestamp - timestamp && config.feedStalenessSeconds > 0) { + return (config.fallbackUsdPerUnitLink, config.fallbackUsdPerUnitLinkDecimals); + } + if (usdPerUnitLink <= 0) { + revert InvalidUsdLinkPrice(usdPerUnitLink); + } + return (uint256(usdPerUnitLink), s_linkToUsdFeed.decimals()); + } + + function _getJuelsFromUsd(uint256 amountUsd) private view returns (uint96) { + (uint256 usdPerLink, uint8 decimals) = getUsdPerUnitLink(); + // (usd) * (10**18 juels/link) * (10**decimals) / (link / usd) = juels + // There are only 1e9*1e18 = 1e27 juels in existence, should not exceed uint96 (2^96 ~ 7e28) + return SafeCast.toUint96((amountUsd * 10 ** (18 + decimals)) / usdPerLink); + } + // ================================================================ // | Cost Estimation | // ================================================================ @@ -142,7 +181,8 @@ abstract contract FunctionsBilling is Routable, IFunctionsBilling { } uint72 adminFee = getAdminFee(); uint72 donFee = getDONFee(data); - return _calculateCostEstimate(callbackGasLimit, gasPriceWei, donFee, adminFee); + uint72 operationFee = getOperationFee(); + return _calculateCostEstimate(callbackGasLimit, gasPriceWei, donFee, adminFee, operationFee); } /// @notice Estimate the cost in Juels of LINK @@ -152,7 +192,8 @@ abstract contract FunctionsBilling is Routable, IFunctionsBilling { uint32 callbackGasLimit, uint256 gasPriceWei, uint72 donFee, - uint72 adminFee + uint72 adminFee, + uint72 operationFee ) internal view returns (uint96) { // If gas price is less than the minimum fulfillment gas price, override to using the minimum if (gasPriceWei < s_config.minimumEstimateGasPriceWei) { @@ -167,7 +208,7 @@ abstract contract FunctionsBilling is Routable, IFunctionsBilling { uint256 l1FeeWei = ChainSpecificUtil._getCurrentTxL1GasFees(msg.data); uint96 estimatedGasReimbursementJuels = _getJuelsFromWei((gasPriceWithOverestimation * executionGas) + l1FeeWei); - uint96 feesJuels = uint96(donFee) + uint96(adminFee); + uint96 feesJuels = uint96(donFee) + uint96(adminFee) + uint96(operationFee); return estimatedGasReimbursementJuels + feesJuels; } @@ -182,7 +223,7 @@ abstract contract FunctionsBilling is Routable, IFunctionsBilling { /// @return commitment - The parameters of the request that must be held consistent at response time function _startBilling( FunctionsResponse.RequestMeta memory request - ) internal returns (FunctionsResponse.Commitment memory commitment) { + ) internal returns (FunctionsResponse.CommitmentWithOperationFee memory commitment) { FunctionsBillingConfig memory config = s_config; // Nodes should support all past versions of the structure @@ -191,11 +232,13 @@ abstract contract FunctionsBilling is Routable, IFunctionsBilling { } uint72 donFee = getDONFee(request.data); + uint72 operationFee = getOperationFee(); uint96 estimatedTotalCostJuels = _calculateCostEstimate( request.callbackGasLimit, tx.gasprice, donFee, - request.adminFee + request.adminFee, + operationFee ); // Check that subscription can afford the estimated cost @@ -220,7 +263,7 @@ abstract contract FunctionsBilling is Routable, IFunctionsBilling { ) ); - commitment = FunctionsResponse.Commitment({ + commitment = FunctionsResponse.CommitmentWithOperationFee({ adminFee: request.adminFee, coordinator: address(this), client: request.requestingContract, @@ -230,6 +273,7 @@ abstract contract FunctionsBilling is Routable, IFunctionsBilling { timeoutTimestamp: timeoutTimestamp, requestId: requestId, donFee: donFee, + operationFee: operationFee, gasOverheadBeforeCallback: config.gasOverheadBeforeCallback, gasOverheadAfterCallback: config.gasOverheadAfterCallback }); @@ -255,7 +299,10 @@ abstract contract FunctionsBilling is Routable, IFunctionsBilling { bytes memory /* offchainMetadata TODO: use in getDonFee() for dynamic billing */, uint8 reportBatchSize ) internal returns (FunctionsResponse.FulfillResult) { - FunctionsResponse.Commitment memory commitment = abi.decode(onchainMetadata, (FunctionsResponse.Commitment)); + FunctionsResponse.CommitmentWithOperationFee memory commitment = abi.decode( + onchainMetadata, + (FunctionsResponse.CommitmentWithOperationFee) + ); uint256 gasOverheadWei = (commitment.gasOverheadBeforeCallback + commitment.gasOverheadAfterCallback) * tx.gasprice; uint256 l1FeeShareWei = ChainSpecificUtil._getCurrentTxL1GasFees(msg.data) / reportBatchSize; @@ -268,9 +315,21 @@ abstract contract FunctionsBilling is Routable, IFunctionsBilling { response, err, juelsPerGas, - gasOverheadJuels + commitment.donFee, // cost without callback or admin fee, those will be added by the Router + gasOverheadJuels + commitment.donFee + commitment.operationFee, // cost without callback or admin fee, those will be added by the Router msg.sender, - commitment + FunctionsResponse.Commitment({ + adminFee: commitment.adminFee, + coordinator: commitment.coordinator, + client: commitment.client, + subscriptionId: commitment.subscriptionId, + callbackGasLimit: commitment.callbackGasLimit, + estimatedTotalCostJuels: commitment.estimatedTotalCostJuels, + timeoutTimestamp: commitment.timeoutTimestamp, + requestId: commitment.requestId, + donFee: commitment.donFee, + gasOverheadBeforeCallback: commitment.gasOverheadBeforeCallback, + gasOverheadAfterCallback: commitment.gasOverheadAfterCallback + }) ); // The router will only pay the DON on successfully processing the fulfillment @@ -282,19 +341,22 @@ abstract contract FunctionsBilling is Routable, IFunctionsBilling { ) { delete s_requestCommitments[requestId]; // Reimburse the transmitter for the fulfillment gas cost - s_withdrawableTokens[msg.sender] = gasOverheadJuels + callbackCostJuels; + s_withdrawableTokens[msg.sender] += gasOverheadJuels + callbackCostJuels; // Put donFee into the pool of fees, to be split later // Saves on storage writes that would otherwise be charged to the user s_feePool += commitment.donFee; + // Pay the operation fee to the Coordinator owner + s_withdrawableTokens[_owner()] += commitment.operationFee; emit RequestBilled({ requestId: requestId, juelsPerGas: juelsPerGas, l1FeeShareWei: l1FeeShareWei, callbackCostJuels: callbackCostJuels, - totalCostJuels: gasOverheadJuels + callbackCostJuels + commitment.donFee + commitment.adminFee + donFee: commitment.donFee, + adminFee: commitment.adminFee, + operationFee: commitment.operationFee }); } - return resultCode; } @@ -377,4 +439,7 @@ abstract contract FunctionsBilling is Routable, IFunctionsBilling { function _isExistingRequest(bytes32 requestId) internal view returns (bool) { return s_requestCommitments[requestId] != bytes32(0); } + + // Overriden in FunctionsCoordinator.sol + function _owner() internal view virtual returns (address owner); } diff --git a/contracts/src/v0.8/functions/dev/v1_X/FunctionsCoordinator.sol b/contracts/src/v0.8/functions/dev/v1_X/FunctionsCoordinator.sol index 9b3e0cc7d7b..e28b7e13a68 100644 --- a/contracts/src/v0.8/functions/dev/v1_X/FunctionsCoordinator.sol +++ b/contracts/src/v0.8/functions/dev/v1_X/FunctionsCoordinator.sol @@ -17,7 +17,7 @@ contract FunctionsCoordinator is OCR2Base, IFunctionsCoordinator, FunctionsBilli /// @inheritdoc ITypeAndVersion // solhint-disable-next-line chainlink-solidity/all-caps-constant-storage-variables - string public constant override typeAndVersion = "Functions Coordinator v1.2.0"; + string public constant override typeAndVersion = "Functions Coordinator v2.0.0"; event OracleRequest( bytes32 indexed requestId, @@ -29,7 +29,7 @@ contract FunctionsCoordinator is OCR2Base, IFunctionsCoordinator, FunctionsBilli uint16 dataVersion, bytes32 flags, uint64 callbackGasLimit, - FunctionsResponse.Commitment commitment + FunctionsResponse.CommitmentWithOperationFee commitment ); event OracleResponse(bytes32 indexed requestId, address transmitter); @@ -43,8 +43,9 @@ contract FunctionsCoordinator is OCR2Base, IFunctionsCoordinator, FunctionsBilli constructor( address router, FunctionsBillingConfig memory config, - address linkToNativeFeed - ) OCR2Base() FunctionsBilling(router, config, linkToNativeFeed) {} + address linkToNativeFeed, + address linkToUsdFeed + ) OCR2Base() FunctionsBilling(router, config, linkToNativeFeed, linkToUsdFeed) {} /// @inheritdoc IFunctionsCoordinator function getThresholdPublicKey() external view override returns (bytes memory) { @@ -93,11 +94,11 @@ contract FunctionsCoordinator is OCR2Base, IFunctionsCoordinator, FunctionsBilli /// @inheritdoc IFunctionsCoordinator function startRequest( FunctionsResponse.RequestMeta calldata request - ) external override onlyRouter returns (FunctionsResponse.Commitment memory commitment) { - commitment = _startBilling(request); + ) external override onlyRouter returns (FunctionsResponse.Commitment memory) { + FunctionsResponse.CommitmentWithOperationFee memory commitmentWithOperationFee = _startBilling(request); emit OracleRequest( - commitment.requestId, + commitmentWithOperationFee.requestId, request.requestingContract, // solhint-disable-next-line avoid-tx-origin tx.origin, @@ -107,10 +108,23 @@ contract FunctionsCoordinator is OCR2Base, IFunctionsCoordinator, FunctionsBilli request.dataVersion, request.flags, request.callbackGasLimit, - commitment + commitmentWithOperationFee ); - return commitment; + return + FunctionsResponse.Commitment({ + adminFee: commitmentWithOperationFee.adminFee, + coordinator: commitmentWithOperationFee.coordinator, + client: commitmentWithOperationFee.client, + subscriptionId: commitmentWithOperationFee.subscriptionId, + callbackGasLimit: commitmentWithOperationFee.callbackGasLimit, + estimatedTotalCostJuels: commitmentWithOperationFee.estimatedTotalCostJuels, + timeoutTimestamp: commitmentWithOperationFee.timeoutTimestamp, + requestId: commitmentWithOperationFee.requestId, + donFee: commitmentWithOperationFee.donFee, + gasOverheadBeforeCallback: commitmentWithOperationFee.gasOverheadBeforeCallback, + gasOverheadAfterCallback: commitmentWithOperationFee.gasOverheadAfterCallback + }); } /// @dev DON fees are pooled together. If the OCR configuration is going to change, these need to be distributed. @@ -205,4 +219,9 @@ contract FunctionsCoordinator is OCR2Base, IFunctionsCoordinator, FunctionsBilli function _onlyOwner() internal view override { _validateOwnership(); } + + /// @dev Used in FunctionsBilling.sol + function _owner() internal view override returns (address owner) { + return this.owner(); + } } diff --git a/contracts/src/v0.8/functions/dev/v1_X/interfaces/IFunctionsBilling.sol b/contracts/src/v0.8/functions/dev/v1_X/interfaces/IFunctionsBilling.sol index 0bd7817f779..08676b9912a 100644 --- a/contracts/src/v0.8/functions/dev/v1_X/interfaces/IFunctionsBilling.sol +++ b/contracts/src/v0.8/functions/dev/v1_X/interfaces/IFunctionsBilling.sol @@ -7,11 +7,20 @@ interface IFunctionsBilling { /// @return weiPerUnitLink - The amount of WEI in one LINK function getWeiPerUnitLink() external view returns (uint256); + /// @notice Return the current conversion from LINK to USD from the configured Chainlink data feed + /// @return weiPerUnitLink - The amount of USD that one LINK is worth + /// @return decimals - The number of decimals that should be represented in the price feed's response + function getUsdPerUnitLink() external view returns (uint256, uint8); + /// @notice Determine the fee that will be split between Node Operators for servicing a request /// @param requestCBOR - CBOR encoded Chainlink Functions request data, use FunctionsRequest library to encode a request /// @return fee - Cost in Juels (1e18) of LINK function getDONFee(bytes memory requestCBOR) external view returns (uint72); + /// @notice Determine the fee that will be paid to the Coordinator owner for operating the network + /// @return fee - Cost in Juels (1e18) of LINK + function getOperationFee() external view returns (uint72); + /// @notice Determine the fee that will be paid to the Router owner for operating the network /// @return fee - Cost in Juels (1e18) of LINK function getAdminFee() external view returns (uint72); @@ -53,9 +62,12 @@ struct FunctionsBillingConfig { uint32 feedStalenessSeconds; // ║ How long before we consider the feed price to be stale and fallback to fallbackNativePerUnitLink. uint32 gasOverheadBeforeCallback; // ║ Represents the average gas execution cost before the fulfillment callback. This amount is always billed for every request. uint32 gasOverheadAfterCallback; // ║ Represents the average gas execution cost after the fulfillment callback. This amount is always billed for every request. - uint72 donFee; // ║ Additional flat fee (in Juels of LINK) that will be split between Node Operators. Max value is 2^80 - 1 == 1.2m LINK. + uint72 donFee; // ║ Additional flat fee (denominated in cents of USD, paid as LINK) that will be split between Node Operators. uint40 minimumEstimateGasPriceWei; // ║ The lowest amount of wei that will be used as the tx.gasprice when estimating the cost to fulfill the request uint16 maxSupportedRequestDataVersion; // ═══════╝ The highest support request data version supported by the node. All lower versions should also be supported. uint224 fallbackNativePerUnitLink; // ═══════════╗ Fallback NATIVE CURRENCY / LINK conversion rate if the data feed is stale uint32 requestTimeoutSeconds; // ════════════════╝ How many seconds it takes before we consider a request to be timed out + uint72 operationFee; // ═════════════════════════╗ Additional flat fee (denominated in cents of USD, paid as LINK) that will be paid to the owner of the Coordinator contract. + uint64 fallbackUsdPerUnitLink; // ║ Fallback LINK / USD conversion rate if the data feed is stale + uint8 fallbackUsdPerUnitLinkDecimals; // ════════╝ Fallback LINK / USD conversion rate decimal places if the data feed is stale } diff --git a/contracts/src/v0.8/functions/dev/v1_X/libraries/FunctionsResponse.sol b/contracts/src/v0.8/functions/dev/v1_X/libraries/FunctionsResponse.sol index 65fad665d69..126238830dc 100644 --- a/contracts/src/v0.8/functions/dev/v1_X/libraries/FunctionsResponse.sol +++ b/contracts/src/v0.8/functions/dev/v1_X/libraries/FunctionsResponse.sol @@ -41,4 +41,20 @@ library FunctionsResponse { uint40 gasOverheadAfterCallback; // ║ Represents the average gas execution cost after the fulfillment callback. uint32 timeoutTimestamp; // ═══════════╝ The timestamp at which a request will be eligible to be timed out } + + /// @dev This structure will take the place of Commitment in the Router contract's version 2.0 + struct CommitmentWithOperationFee { + bytes32 requestId; // ═════════════════╸ A unique identifier for a Chainlink Functions request + address coordinator; // ═══════════════╗ The Coordinator contract that manages the DON that is servicing a request + uint96 estimatedTotalCostJuels; // ════╝ The maximum cost in Juels (1e18) of LINK that will be charged to fulfill a request + address client; // ════════════════════╗ The client contract that sent the request + uint64 subscriptionId; // ║ Identifier of the billing subscription that will be charged for the request + uint32 callbackGasLimit; // ═══════════╝ The amount of gas that the callback to the consuming contract will be given + uint72 adminFee; // ═══════════════════╗ Flat fee (in Juels of LINK) that will be paid to the Router Owner for operation of the network + uint72 donFee; // ║ Fee (in Juels of LINK) that will be split between Node Operators for servicing a request + uint40 gasOverheadBeforeCallback; // ║ Represents the average gas execution cost before the fulfillment callback. + uint40 gasOverheadAfterCallback; // ║ Represents the average gas execution cost after the fulfillment callback. + uint32 timeoutTimestamp; // ═══════════╝ The timestamp at which a request will be eligible to be timed out + uint72 operationFee; // ══════════════════════ Flat fee (in Juels of LINK) that will be paid to the Coordinator Owner for operation of the network + } } diff --git a/contracts/src/v0.8/functions/tests/v1_X/FunctionsBilling.t.sol b/contracts/src/v0.8/functions/tests/v1_X/FunctionsBilling.t.sol index 66640003427..b65d8ef8746 100644 --- a/contracts/src/v0.8/functions/tests/v1_X/FunctionsBilling.t.sol +++ b/contracts/src/v0.8/functions/tests/v1_X/FunctionsBilling.t.sol @@ -52,9 +52,12 @@ contract FunctionsBilling_UpdateConfig is FunctionsRouterSetup { gasOverheadBeforeCallback: getCoordinatorConfig().gasOverheadBeforeCallback * 2, requestTimeoutSeconds: getCoordinatorConfig().requestTimeoutSeconds * 2, donFee: getCoordinatorConfig().donFee * 2, + operationFee: getCoordinatorConfig().operationFee * 2, maxSupportedRequestDataVersion: getCoordinatorConfig().maxSupportedRequestDataVersion * 2, fulfillmentGasPriceOverEstimationBP: getCoordinatorConfig().fulfillmentGasPriceOverEstimationBP * 2, fallbackNativePerUnitLink: getCoordinatorConfig().fallbackNativePerUnitLink * 2, + fallbackUsdPerUnitLink: getCoordinatorConfig().fallbackUsdPerUnitLink * 2, + fallbackUsdPerUnitLinkDecimals: getCoordinatorConfig().fallbackUsdPerUnitLinkDecimals * 2, minimumEstimateGasPriceWei: getCoordinatorConfig().minimumEstimateGasPriceWei * 2 }); } @@ -102,7 +105,23 @@ contract FunctionsBilling_GetDONFee is FunctionsRouterSetup { vm.startPrank(STRANGER_ADDRESS); uint72 donFee = s_functionsCoordinator.getDONFee(new bytes(0)); - assertEq(donFee, s_donFee); + uint72 expectedDonFee = uint72(((s_donFee * 10 ** (18 + LINK_USD_DECIMALS)) / uint256(LINK_USD_RATE)) / 100); + assertEq(donFee, expectedDonFee); + } +} + +/// @notice #getOperationFee +contract FunctionsBilling_GetOperationFee is FunctionsRouterSetup { + function test_GetOperationFee_Success() public { + // Send as stranger + vm.stopPrank(); + vm.startPrank(STRANGER_ADDRESS); + + uint72 operationFee = s_functionsCoordinator.getOperationFee(); + uint72 expectedOperationFee = uint72( + ((s_operationFee * 10 ** (18 + LINK_USD_DECIMALS)) / uint256(LINK_USD_RATE)) / 100 + ); + assertEq(operationFee, expectedOperationFee); } } @@ -183,7 +202,10 @@ contract FunctionsBilling_EstimateCost is FunctionsSubscriptionSetup { callbackGasLimit, gasPriceWei ); - uint96 expectedCostEstimate = 51110500000000200; + uint96 expectedCostEstimate = 51110500000000000 + + s_adminFee + + s_functionsCoordinator.getDONFee(requestData) + + s_functionsCoordinator.getOperationFee(); assertEq(costEstimate, expectedCostEstimate); } @@ -208,7 +230,10 @@ contract FunctionsBilling_EstimateCost is FunctionsSubscriptionSetup { callbackGasLimit, gasPriceWei ); - uint96 expectedCostEstimate = 255552500000000200; + uint96 expectedCostEstimate = 255552500000000000 + + s_adminFee + + s_functionsCoordinator.getDONFee(requestData) + + s_functionsCoordinator.getOperationFee(); assertEq(costEstimate, expectedCostEstimate); } } @@ -276,17 +301,15 @@ contract FunctionsBilling__FulfillAndBill is FunctionsClientRequestSetup { uint96 juelsPerGas, uint256 l1FeeShareWei, uint96 callbackCostJuels, - uint96 totalCostJuels + uint72 donFee, + uint72 adminFee, + uint72 operationFee ); function test__FulfillAndBill_Success() public { uint96 juelsPerGas = uint96((1e18 * TX_GASPRICE_START) / uint256(LINK_ETH_RATE)); uint96 callbackCostGas = 5072; // Taken manually uint96 callbackCostJuels = juelsPerGas * callbackCostGas; - uint96 gasOverheadJuels = juelsPerGas * - (getCoordinatorConfig().gasOverheadBeforeCallback + getCoordinatorConfig().gasOverheadAfterCallback); - - uint96 totalCostJuels = gasOverheadJuels + callbackCostJuels + s_donFee + s_adminFee; // topic0 (function signature, always checked), check topic1 (true), NOT topic2 (false), NOT topic3 (false), and data (true). bool checkTopic1 = true; @@ -294,13 +317,21 @@ contract FunctionsBilling__FulfillAndBill is FunctionsClientRequestSetup { bool checkTopic3 = false; bool checkData = true; vm.expectEmit(checkTopic1, checkTopic2, checkTopic3, checkData); - emit RequestBilled(s_requests[1].requestId, juelsPerGas, 0, callbackCostJuels, totalCostJuels); + emit RequestBilled( + s_requests[1].requestId, + juelsPerGas, + 0, + callbackCostJuels, + s_functionsCoordinator.getDONFee(new bytes(0)), + s_adminFee, + s_functionsCoordinator.getOperationFee() + ); FunctionsResponse.FulfillResult resultCode = s_functionsCoordinator.fulfillAndBill_HARNESS( s_requests[1].requestId, new bytes(0), new bytes(0), - abi.encode(s_requests[1].commitment), + abi.encode(s_requests[1].commitmentWithOperationFee), new bytes(0), 1 ); @@ -377,7 +408,7 @@ contract FunctionsBilling_OracleWithdraw is FunctionsMultipleFulfillmentsSetup { vm.stopPrank(); vm.startPrank(NOP_TRANSMITTER_ADDRESS_1); - uint96 expectedTransmitterBalance = s_fulfillmentCoordinatorBalance / 3; + uint96 expectedTransmitterBalance = s_fulfillmentCoordinatorBalance / s_requestsFulfilled; // Attempt to withdraw half of balance uint96 halfBalance = expectedTransmitterBalance / 2; @@ -394,33 +425,49 @@ contract FunctionsBilling_OracleWithdraw is FunctionsMultipleFulfillmentsSetup { uint256[4] memory transmitterBalancesBefore = _getTransmitterBalances(); _assertTransmittersAllHaveBalance(transmitterBalancesBefore, 0); - // Send as transmitter 1, which has transmitted 1 report + // Send as transmitter 1, which has transmitted 2 reports vm.stopPrank(); vm.startPrank(NOP_TRANSMITTER_ADDRESS_1); // Attempt to withdraw with no amount, which will withdraw the full balance s_functionsCoordinator.oracleWithdraw(NOP_TRANSMITTER_ADDRESS_1, 0); - // 3 report transmissions have been made - uint96 totalDonFees = s_donFee * 3; - // 4 transmitters will share the DON fees - uint96 donFeeShare = totalDonFees / 4; - uint96 expectedTransmitterBalance = ((s_fulfillmentCoordinatorBalance - totalDonFees) / 3) + donFeeShare; + uint96 totalOperationFees = s_functionsCoordinator.getOperationFee() * s_requestsFulfilled; + uint96 totalDonFees = s_functionsCoordinator.getDONFee(new bytes(0)) * s_requestsFulfilled; + uint96 donFeeShare = totalDonFees / uint8(s_transmitters.length); + uint96 expectedBalancePerFulfillment = ((s_fulfillmentCoordinatorBalance - totalOperationFees - totalDonFees) / + s_requestsFulfilled); uint256[4] memory transmitterBalancesAfter = _getTransmitterBalances(); - assertEq(transmitterBalancesAfter[0], expectedTransmitterBalance); + // Transmitter 1 has transmitted twice + assertEq(transmitterBalancesAfter[0], (expectedBalancePerFulfillment * 2) + donFeeShare); assertEq(transmitterBalancesAfter[1], 0); assertEq(transmitterBalancesAfter[2], 0); assertEq(transmitterBalancesAfter[3], 0); } + + function test_OracleWithdraw_SuccessCoordinatorOwner() public { + // Send as Coordinator Owner + address coordinatorOwner = s_functionsCoordinator.owner(); + vm.stopPrank(); + vm.startPrank(coordinatorOwner); + + uint256 coordinatorOwnerBalanceBefore = s_linkToken.balanceOf(coordinatorOwner); + + // Attempt to withdraw with no amount, which will withdraw the full balance + s_functionsCoordinator.oracleWithdraw(coordinatorOwner, 0); + + // 4 report transmissions have been made + uint96 totalOperationFees = s_functionsCoordinator.getOperationFee() * s_requestsFulfilled; + + uint256 coordinatorOwnerBalanceAfter = s_linkToken.balanceOf(coordinatorOwner); + assertEq(coordinatorOwnerBalanceBefore + totalOperationFees, coordinatorOwnerBalanceAfter); + } } /// @notice #oracleWithdrawAll contract FunctionsBilling_OracleWithdrawAll is FunctionsMultipleFulfillmentsSetup { function setUp() public virtual override { - // Use no DON fee so that a transmitter has a balance of 0 - s_donFee = 0; - FunctionsMultipleFulfillmentsSetup.setUp(); } @@ -439,22 +486,28 @@ contract FunctionsBilling_OracleWithdrawAll is FunctionsMultipleFulfillmentsSetu s_functionsCoordinator.oracleWithdrawAll(); - uint96 expectedTransmitterBalance = s_fulfillmentCoordinatorBalance / 3; + uint96 totalOperationFees = s_functionsCoordinator.getOperationFee() * s_requestsFulfilled; + uint96 totalDonFees = s_functionsCoordinator.getDONFee(new bytes(0)) * s_requestsFulfilled; + uint96 donFeeShare = totalDonFees / uint8(s_transmitters.length); + uint96 expectedBalancePerFulfillment = ((s_fulfillmentCoordinatorBalance - totalOperationFees - totalDonFees) / + s_requestsFulfilled); uint256[4] memory transmitterBalancesAfter = _getTransmitterBalances(); - assertEq(transmitterBalancesAfter[0], expectedTransmitterBalance); - assertEq(transmitterBalancesAfter[1], expectedTransmitterBalance); - assertEq(transmitterBalancesAfter[2], expectedTransmitterBalance); - // Transmitter 4 has no balance - assertEq(transmitterBalancesAfter[3], 0); + // Transmitter 1 has transmitted twice + assertEq(transmitterBalancesAfter[0], (expectedBalancePerFulfillment * 2) + donFeeShare); + // Transmitter 2 and 3 have transmitted once + assertEq(transmitterBalancesAfter[1], expectedBalancePerFulfillment + donFeeShare); + assertEq(transmitterBalancesAfter[2], expectedBalancePerFulfillment + donFeeShare); + // Transmitter 4 only not transmitted, it only has its share of the DON fees + assertEq(transmitterBalancesAfter[3], donFeeShare); } } /// @notice #_disperseFeePool contract FunctionsBilling__DisperseFeePool is FunctionsRouterSetup { function test__DisperseFeePool_RevertIfNotSet() public { - // Manually set s_feePool (at slot 11) to 1 to get past first check in _disperseFeePool - vm.store(address(s_functionsCoordinator), bytes32(uint256(11)), bytes32(uint256(1))); + // Manually set s_feePool (at slot 12) to 1 to get past first check in _disperseFeePool + vm.store(address(s_functionsCoordinator), bytes32(uint256(12)), bytes32(uint256(1))); vm.expectRevert(FunctionsBilling.NoTransmittersSet.selector); s_functionsCoordinator.disperseFeePool_HARNESS(); diff --git a/contracts/src/v0.8/functions/tests/v1_X/FunctionsCoordinator.t.sol b/contracts/src/v0.8/functions/tests/v1_X/FunctionsCoordinator.t.sol index c21a2c090f7..f532a5a12ef 100644 --- a/contracts/src/v0.8/functions/tests/v1_X/FunctionsCoordinator.t.sol +++ b/contracts/src/v0.8/functions/tests/v1_X/FunctionsCoordinator.t.sol @@ -14,7 +14,7 @@ import {FunctionsRouterSetup, FunctionsDONSetup, FunctionsSubscriptionSetup} fro /// @notice #constructor contract FunctionsCoordinator_Constructor is FunctionsRouterSetup { function test_Constructor_Success() public { - assertEq(s_functionsCoordinator.typeAndVersion(), "Functions Coordinator v1.2.0"); + assertEq(s_functionsCoordinator.typeAndVersion(), "Functions Coordinator v2.0.0"); assertEq(s_functionsCoordinator.owner(), OWNER_ADDRESS); } } @@ -156,7 +156,7 @@ contract FunctionsCoordinator_StartRequest is FunctionsSubscriptionSetup { uint16 dataVersion, bytes32 flags, uint64 callbackGasLimit, - FunctionsResponse.Commitment commitment + FunctionsResponse.CommitmentWithOperationFee commitment ); function test_StartRequest_Success() public { @@ -189,19 +189,21 @@ contract FunctionsCoordinator_StartRequest is FunctionsSubscriptionSetup { ) ); - FunctionsResponse.Commitment memory expectedComittment = FunctionsResponse.Commitment({ - adminFee: s_adminFee, - coordinator: address(s_functionsCoordinator), - client: address(s_functionsClient), - subscriptionId: s_subscriptionId, - callbackGasLimit: _callbackGasLimit, - estimatedTotalCostJuels: costEstimate, - timeoutTimestamp: timeoutTimestamp, - requestId: expectedRequestId, - donFee: s_donFee, - gasOverheadBeforeCallback: getCoordinatorConfig().gasOverheadBeforeCallback, - gasOverheadAfterCallback: getCoordinatorConfig().gasOverheadAfterCallback - }); + FunctionsResponse.CommitmentWithOperationFee memory expectedComittment = FunctionsResponse + .CommitmentWithOperationFee({ + adminFee: s_adminFee, + coordinator: address(s_functionsCoordinator), + client: address(s_functionsClient), + subscriptionId: s_subscriptionId, + callbackGasLimit: _callbackGasLimit, + estimatedTotalCostJuels: costEstimate, + timeoutTimestamp: timeoutTimestamp, + requestId: expectedRequestId, + donFee: s_functionsCoordinator.getDONFee(_requestData), + operationFee: s_functionsCoordinator.getOperationFee(), + gasOverheadBeforeCallback: getCoordinatorConfig().gasOverheadBeforeCallback, + gasOverheadAfterCallback: getCoordinatorConfig().gasOverheadAfterCallback + }); // topic0 (function signature, always checked), topic1 (true), topic2 (true), NOT topic3 (false), and data (true). vm.expectEmit(true, true, false, true); diff --git a/contracts/src/v0.8/functions/tests/v1_X/FunctionsRouter.t.sol b/contracts/src/v0.8/functions/tests/v1_X/FunctionsRouter.t.sol index 43540ba02b8..3dc7378ffed 100644 --- a/contracts/src/v0.8/functions/tests/v1_X/FunctionsRouter.t.sol +++ b/contracts/src/v0.8/functions/tests/v1_X/FunctionsRouter.t.sol @@ -518,7 +518,8 @@ contract FunctionsRouter_SendRequestToProposed is FunctionsSubscriptionSetup { s_functionsCoordinator2 = new FunctionsCoordinatorTestHelper( address(s_functionsRouter), getCoordinatorConfig(), - address(s_linkEthFeed) + address(s_linkEthFeed), + address(s_linkUsdFeed) ); // Propose new Coordinator contract @@ -1071,9 +1072,9 @@ contract FunctionsRouter_Fulfill is FunctionsClientRequestSetup { // Get commitment data from OracleRequest event log Vm.Log[] memory entries = vm.getRecordedLogs(); - (, , , , , , , FunctionsResponse.Commitment memory _commitment) = abi.decode( + (, , , , , , , FunctionsResponse.CommitmentWithOperationFee memory _commitment) = abi.decode( entries[0].data, - (address, uint64, address, bytes, uint16, bytes32, uint64, FunctionsResponse.Commitment) + (address, uint64, address, bytes, uint16, bytes32, uint64, FunctionsResponse.CommitmentWithOperationFee) ); s_requests[requestKey] = Request({ @@ -1085,7 +1086,20 @@ contract FunctionsRouter_Fulfill is FunctionsClientRequestSetup { callbackGasLimit: callbackGasLimit }), requestId: requestId, - commitment: _commitment + commitment: FunctionsResponse.Commitment({ + adminFee: _commitment.adminFee, + coordinator: _commitment.coordinator, + client: _commitment.client, + subscriptionId: _commitment.subscriptionId, + callbackGasLimit: _commitment.callbackGasLimit, + estimatedTotalCostJuels: _commitment.estimatedTotalCostJuels, + timeoutTimestamp: _commitment.timeoutTimestamp, + requestId: _commitment.requestId, + donFee: _commitment.donFee, + gasOverheadBeforeCallback: _commitment.gasOverheadBeforeCallback, + gasOverheadAfterCallback: _commitment.gasOverheadAfterCallback + }), + commitmentWithOperationFee: _commitment }); // Fulfill @@ -1271,7 +1285,8 @@ contract FunctionsRouter_GetProposedContractById is FunctionsRoutesSetup { s_functionsCoordinator2 = new FunctionsCoordinatorTestHelper( address(s_functionsRouter), getCoordinatorConfig(), - address(s_linkEthFeed) + address(s_linkEthFeed), + address(s_linkUsdFeed) ); // Propose new Coordinator contract @@ -1317,7 +1332,8 @@ contract FunctionsRouter_GetProposedContractSet is FunctionsRoutesSetup { s_functionsCoordinator2 = new FunctionsCoordinatorTestHelper( address(s_functionsRouter), getCoordinatorConfig(), - address(s_linkEthFeed) + address(s_linkEthFeed), + address(s_linkUsdFeed) ); // Propose new Coordinator contract @@ -1357,7 +1373,8 @@ contract FunctionsRouter_ProposeContractsUpdate is FunctionsRoutesSetup { s_functionsCoordinator2 = new FunctionsCoordinatorTestHelper( address(s_functionsRouter), getCoordinatorConfig(), - address(s_linkEthFeed) + address(s_linkEthFeed), + address(s_linkUsdFeed) ); // Propose new Coordinator contract @@ -1459,7 +1476,8 @@ contract FunctionsRouter_UpdateContracts is FunctionsRoutesSetup { s_functionsCoordinator2 = new FunctionsCoordinatorTestHelper( address(s_functionsRouter), getCoordinatorConfig(), - address(s_linkEthFeed) + address(s_linkEthFeed), + address(s_linkUsdFeed) ); // Propose new Coordinator contract diff --git a/contracts/src/v0.8/functions/tests/v1_X/Setup.t.sol b/contracts/src/v0.8/functions/tests/v1_X/Setup.t.sol index 296e61c040c..82f81c6f043 100644 --- a/contracts/src/v0.8/functions/tests/v1_X/Setup.t.sol +++ b/contracts/src/v0.8/functions/tests/v1_X/Setup.t.sol @@ -20,17 +20,22 @@ contract FunctionsRouterSetup is BaseTest { FunctionsRouterHarness internal s_functionsRouter; FunctionsCoordinatorHarness internal s_functionsCoordinator; MockV3Aggregator internal s_linkEthFeed; + MockV3Aggregator internal s_linkUsdFeed; TermsOfServiceAllowList internal s_termsOfServiceAllowList; MockLinkToken internal s_linkToken; uint16 internal s_maxConsumersPerSubscription = 3; - uint72 internal s_adminFee = 100; - uint72 internal s_donFee = 100; + uint72 internal s_adminFee = 100; // 100 Juels + uint72 internal s_donFee = 100; // $1 + uint72 internal s_operationFee = 100; // $1 bytes4 internal s_handleOracleFulfillmentSelector = 0x0ca76175; uint16 s_subscriptionDepositMinimumRequests = 1; uint72 s_subscriptionDepositJuels = 11 * JUELS_PER_LINK; - int256 internal LINK_ETH_RATE = 6000000000000000; + int256 internal LINK_ETH_RATE = 6_000_000_000_000_000; + uint8 internal LINK_ETH_DECIMALS = 18; + int256 internal LINK_USD_RATE = 1_500_000_000; + uint8 internal LINK_USD_DECIMALS = 8; uint256 internal TOS_SIGNER_PRIVATE_KEY = 0x3; address internal TOS_SIGNER = vm.addr(TOS_SIGNER_PRIVATE_KEY); @@ -39,11 +44,13 @@ contract FunctionsRouterSetup is BaseTest { BaseTest.setUp(); s_linkToken = new MockLinkToken(); s_functionsRouter = new FunctionsRouterHarness(address(s_linkToken), getRouterConfig()); - s_linkEthFeed = new MockV3Aggregator(0, LINK_ETH_RATE); + s_linkEthFeed = new MockV3Aggregator(LINK_ETH_DECIMALS, LINK_ETH_RATE); + s_linkUsdFeed = new MockV3Aggregator(LINK_USD_DECIMALS, LINK_USD_RATE); s_functionsCoordinator = new FunctionsCoordinatorHarness( address(s_functionsRouter), getCoordinatorConfig(), - address(s_linkEthFeed) + address(s_linkEthFeed), + address(s_linkUsdFeed) ); address[] memory initialAllowedSenders; address[] memory initialBlockedSenders; @@ -80,9 +87,12 @@ contract FunctionsRouterSetup is BaseTest { gasOverheadBeforeCallback: 105_000, requestTimeoutSeconds: 60 * 5, // 5 minutes donFee: s_donFee, + operationFee: s_operationFee, maxSupportedRequestDataVersion: 1, fulfillmentGasPriceOverEstimationBP: 5000, fallbackNativePerUnitLink: 5000000000000000, + fallbackUsdPerUnitLink: 1400000000, + fallbackUsdPerUnitLinkDecimals: 8, minimumEstimateGasPriceWei: 1000000000 // 1 gwei }); } @@ -94,22 +104,22 @@ contract FunctionsRouterSetup is BaseTest { /// @notice Set up to set the OCR configuration of the Coordinator contract contract FunctionsDONSetup is FunctionsRouterSetup { - uint256 internal NOP_SIGNER_PRIVATE_KEY_1 = 0x100; + uint256 internal NOP_SIGNER_PRIVATE_KEY_1 = 0x400; address internal NOP_SIGNER_ADDRESS_1 = vm.addr(NOP_SIGNER_PRIVATE_KEY_1); - uint256 internal NOP_SIGNER_PRIVATE_KEY_2 = 0x101; + uint256 internal NOP_SIGNER_PRIVATE_KEY_2 = 0x401; address internal NOP_SIGNER_ADDRESS_2 = vm.addr(NOP_SIGNER_PRIVATE_KEY_2); - uint256 internal NOP_SIGNER_PRIVATE_KEY_3 = 0x102; + uint256 internal NOP_SIGNER_PRIVATE_KEY_3 = 0x402; address internal NOP_SIGNER_ADDRESS_3 = vm.addr(NOP_SIGNER_PRIVATE_KEY_3); - uint256 internal NOP_SIGNER_PRIVATE_KEY_4 = 0x103; + uint256 internal NOP_SIGNER_PRIVATE_KEY_4 = 0x403; address internal NOP_SIGNER_ADDRESS_4 = vm.addr(NOP_SIGNER_PRIVATE_KEY_4); - uint256 internal NOP_TRANSMITTER_PRIVATE_KEY_1 = 0x104; + uint256 internal NOP_TRANSMITTER_PRIVATE_KEY_1 = 0x404; address internal NOP_TRANSMITTER_ADDRESS_1 = vm.addr(NOP_TRANSMITTER_PRIVATE_KEY_1); - uint256 internal NOP_TRANSMITTER_PRIVATE_KEY_2 = 0x105; + uint256 internal NOP_TRANSMITTER_PRIVATE_KEY_2 = 0x405; address internal NOP_TRANSMITTER_ADDRESS_2 = vm.addr(NOP_TRANSMITTER_PRIVATE_KEY_2); - uint256 internal NOP_TRANSMITTER_PRIVATE_KEY_3 = 0x106; + uint256 internal NOP_TRANSMITTER_PRIVATE_KEY_3 = 0x406; address internal NOP_TRANSMITTER_ADDRESS_3 = vm.addr(NOP_TRANSMITTER_PRIVATE_KEY_3); - uint256 internal NOP_TRANSMITTER_PRIVATE_KEY_4 = 0x107; + uint256 internal NOP_TRANSMITTER_PRIVATE_KEY_4 = 0x407; address internal NOP_TRANSMITTER_ADDRESS_4 = vm.addr(NOP_TRANSMITTER_PRIVATE_KEY_4); address[] internal s_signers; @@ -252,6 +262,7 @@ contract FunctionsClientRequestSetup is FunctionsSubscriptionSetup { RequestData requestData; bytes32 requestId; FunctionsResponse.Commitment commitment; + FunctionsResponse.CommitmentWithOperationFee commitmentWithOperationFee; } mapping(uint256 requestNumber => Request) s_requests; @@ -264,6 +275,8 @@ contract FunctionsClientRequestSetup is FunctionsSubscriptionSetup { uint96 s_fulfillmentRouterOwnerBalance = 0; uint96 s_fulfillmentCoordinatorBalance = 0; + uint8 s_requestsSent = 0; + uint8 s_requestsFulfilled = 0; function setUp() public virtual override { FunctionsSubscriptionSetup.setUp(); @@ -289,7 +302,13 @@ contract FunctionsClientRequestSetup is FunctionsSubscriptionSetup { uint96 gasOverheadJuels = juelsPerGas * ((getCoordinatorConfig().gasOverheadBeforeCallback + getCoordinatorConfig().gasOverheadAfterCallback)); uint96 callbackGasCostJuels = uint96(juelsPerGas * callbackGas); - return gasOverheadJuels + s_donFee + s_adminFee + callbackGasCostJuels; + bytes memory emptyData = new bytes(0); + return + gasOverheadJuels + + s_functionsCoordinator.getDONFee(emptyData) + + s_adminFee + + s_functionsCoordinator.getOperationFee() + + callbackGasCostJuels; } /// @notice Predicts the actual cost of a request @@ -299,7 +318,13 @@ contract FunctionsClientRequestSetup is FunctionsSubscriptionSetup { uint96 gasOverheadJuels = juelsPerGas * (getCoordinatorConfig().gasOverheadBeforeCallback + getCoordinatorConfig().gasOverheadAfterCallback); uint96 callbackGasCostJuels = uint96(juelsPerGas * gasUsed); - return gasOverheadJuels + s_donFee + s_adminFee + callbackGasCostJuels; + bytes memory emptyData = new bytes(0); + return + gasOverheadJuels + + s_functionsCoordinator.getDONFee(emptyData) + + s_adminFee + + s_functionsCoordinator.getOperationFee() + + callbackGasCostJuels; } /// @notice Send a request and store information about it in s_requests @@ -337,9 +362,9 @@ contract FunctionsClientRequestSetup is FunctionsSubscriptionSetup { // Get commitment data from OracleRequest event log Vm.Log[] memory entries = vm.getRecordedLogs(); - (, , , , , , , FunctionsResponse.Commitment memory commitment) = abi.decode( + (, , , , , , , FunctionsResponse.CommitmentWithOperationFee memory commitment) = abi.decode( entries[0].data, - (address, uint64, address, bytes, uint16, bytes32, uint64, FunctionsResponse.Commitment) + (address, uint64, address, bytes, uint16, bytes32, uint64, FunctionsResponse.CommitmentWithOperationFee) ); s_requests[requestNumberKey] = Request({ requestData: RequestData({ @@ -350,8 +375,22 @@ contract FunctionsClientRequestSetup is FunctionsSubscriptionSetup { callbackGasLimit: callbackGasLimit }), requestId: requestId, - commitment: commitment + commitment: FunctionsResponse.Commitment({ + adminFee: commitment.adminFee, + coordinator: commitment.coordinator, + client: commitment.client, + subscriptionId: commitment.subscriptionId, + callbackGasLimit: commitment.callbackGasLimit, + estimatedTotalCostJuels: commitment.estimatedTotalCostJuels, + timeoutTimestamp: commitment.timeoutTimestamp, + requestId: commitment.requestId, + donFee: commitment.donFee, + gasOverheadBeforeCallback: commitment.gasOverheadBeforeCallback, + gasOverheadAfterCallback: commitment.gasOverheadAfterCallback + }), + commitmentWithOperationFee: commitment }); + s_requestsSent += 1; } /// @notice Send a request and store information about it in s_requests @@ -399,7 +438,7 @@ contract FunctionsClientRequestSetup is FunctionsSubscriptionSetup { _requestIds[i] = s_requests[requestNumberKeys[i]].requestId; _results[i] = bytes(results[i]); _errors[i] = errors[i]; - _onchainMetadata[i] = abi.encode(s_requests[requestNumberKeys[i]].commitment); + _onchainMetadata[i] = abi.encode(s_requests[requestNumberKeys[i]].commitmentWithOperationFee); _offchainMetadata[i] = new bytes(0); // No off-chain metadata } report = abi.encode(_requestIds, _results, _errors, _onchainMetadata, _offchainMetadata); @@ -505,7 +544,7 @@ contract FunctionsClientRequestSetup is FunctionsSubscriptionSetup { // Send as transmitter vm.stopPrank(); - vm.startPrank(transmitter); + vm.startPrank(transmitter, transmitter); // Send report vm.recordLogs(); @@ -530,6 +569,7 @@ contract FunctionsClientRequestSetup is FunctionsSubscriptionSetup { // TODO: handle multiple requests s_fulfillmentCoordinatorBalance += totalCostJuels - s_adminFee; } + s_requestsFulfilled += 1; // Return prank to Owner vm.stopPrank(); @@ -632,7 +672,7 @@ contract FunctionsMultipleFulfillmentsSetup is FunctionsFulfillmentSetup { function setUp() public virtual override { FunctionsFulfillmentSetup.setUp(); - // Make 2 additional requests (1 already complete) + // Make 3 additional requests (1 already complete) // *** Request #2 *** // Send @@ -662,5 +702,17 @@ contract FunctionsMultipleFulfillmentsSetup is FunctionsFulfillmentSetup { bytes[] memory errors2 = new bytes[](1); errors2[0] = new bytes(0); _reportAndStore(requestNumberKeys2, results2, errors2, NOP_TRANSMITTER_ADDRESS_3, true); + + // *** Request #4 *** + // Send + _sendAndStoreRequest(4, sourceCode, secrets, args, bytesArgs, callbackGasLimit); + // Fulfill as transmitter #1 + uint256[] memory requestNumberKeys3 = new uint256[](1); + requestNumberKeys3[0] = 4; + string[] memory results3 = new string[](1); + results3[0] = "hello world!"; + bytes[] memory errors3 = new bytes[](1); + errors3[0] = new bytes(0); + _reportAndStore(requestNumberKeys3, results3, errors3, NOP_TRANSMITTER_ADDRESS_1, true); } } diff --git a/contracts/src/v0.8/functions/tests/v1_X/testhelpers/FunctionsCoordinatorHarness.sol b/contracts/src/v0.8/functions/tests/v1_X/testhelpers/FunctionsCoordinatorHarness.sol index e4e9f7279a7..a93347d1fca 100644 --- a/contracts/src/v0.8/functions/tests/v1_X/testhelpers/FunctionsCoordinatorHarness.sol +++ b/contracts/src/v0.8/functions/tests/v1_X/testhelpers/FunctionsCoordinatorHarness.sol @@ -10,14 +10,17 @@ import {FunctionsBillingConfig} from "../../../dev/v1_X/interfaces/IFunctionsBil /// @notice Contract to expose internal functions for testing purposes contract FunctionsCoordinatorHarness is FunctionsCoordinator { address s_linkToNativeFeed_HARNESS; + address s_linkToUsdFeed_HARNESS; address s_router_HARNESS; constructor( address router, FunctionsBillingConfig memory config, - address linkToNativeFeed - ) FunctionsCoordinator(router, config, linkToNativeFeed) { + address linkToNativeFeed, + address linkToUsdFeed + ) FunctionsCoordinator(router, config, linkToNativeFeed, linkToUsdFeed) { s_linkToNativeFeed_HARNESS = linkToNativeFeed; + s_linkToUsdFeed_HARNESS = linkToUsdFeed; s_router_HARNESS = router; } @@ -50,6 +53,10 @@ contract FunctionsCoordinatorHarness is FunctionsCoordinator { return s_linkToNativeFeed_HARNESS; } + function getLinkToUsdFeed_HARNESS() external view returns (address) { + return s_linkToUsdFeed_HARNESS; + } + function getRouter_HARNESS() external view returns (address) { return s_router_HARNESS; } @@ -58,14 +65,15 @@ contract FunctionsCoordinatorHarness is FunctionsCoordinator { uint32 callbackGasLimit, uint256 gasPriceWei, uint72 donFee, - uint72 adminFee + uint72 adminFee, + uint72 operationFee ) external view returns (uint96) { - return super._calculateCostEstimate(callbackGasLimit, gasPriceWei, donFee, adminFee); + return super._calculateCostEstimate(callbackGasLimit, gasPriceWei, donFee, adminFee, operationFee); } function startBilling_HARNESS( FunctionsResponse.RequestMeta memory request - ) external returns (FunctionsResponse.Commitment memory commitment) { + ) external returns (FunctionsResponse.CommitmentWithOperationFee memory commitment) { return super._startBilling(request); } @@ -84,6 +92,10 @@ contract FunctionsCoordinatorHarness is FunctionsCoordinator { return super._disperseFeePool(); } + function owner_HARNESS() external view returns (address owner) { + return super._owner(); + } + // ================================================================ // | OCR2 | // ================================================================ diff --git a/contracts/src/v0.8/functions/tests/v1_X/testhelpers/FunctionsCoordinatorTestHelper.sol b/contracts/src/v0.8/functions/tests/v1_X/testhelpers/FunctionsCoordinatorTestHelper.sol index abfec4c2de5..8703d2b254e 100644 --- a/contracts/src/v0.8/functions/tests/v1_X/testhelpers/FunctionsCoordinatorTestHelper.sol +++ b/contracts/src/v0.8/functions/tests/v1_X/testhelpers/FunctionsCoordinatorTestHelper.sol @@ -9,8 +9,9 @@ contract FunctionsCoordinatorTestHelper is FunctionsCoordinator { constructor( address router, FunctionsBillingConfig memory config, - address linkToNativeFeed - ) FunctionsCoordinator(router, config, linkToNativeFeed) {} + address linkToNativeFeed, + address linkToUsdFeed + ) FunctionsCoordinator(router, config, linkToNativeFeed, linkToUsdFeed) {} function callReport(bytes calldata report) external { address[MAX_NUM_ORACLES] memory signers; @@ -54,23 +55,4 @@ contract FunctionsCoordinatorTestHelper is FunctionsCoordinator { }) ); } - - function callReportWithSigners(bytes calldata report, address[MAX_NUM_ORACLES] memory /* signers */) external { - ( - bytes32[] memory requestIds, - bytes[] memory results, - bytes[] memory errors, - bytes[] memory onchainMetadata, - bytes[] memory offchainMetadata - ) = abi.decode(report, (bytes32[], bytes[], bytes[], bytes[], bytes[])); - _report( - DecodedReport({ - requestIds: requestIds, - results: results, - errors: errors, - onchainMetadata: onchainMetadata, - offchainMetadata: offchainMetadata - }) - ); - } } diff --git a/contracts/src/v0.8/functions/v1_1_0/FunctionsBilling.sol b/contracts/src/v0.8/functions/v1_1_0/FunctionsBilling.sol index ff345003741..845d9a585aa 100644 --- a/contracts/src/v0.8/functions/v1_1_0/FunctionsBilling.sol +++ b/contracts/src/v0.8/functions/v1_1_0/FunctionsBilling.sol @@ -298,7 +298,7 @@ abstract contract FunctionsBilling is Routable, IFunctionsBilling { ) { delete s_requestCommitments[requestId]; // Reimburse the transmitter for the fulfillment gas cost - s_withdrawableTokens[msg.sender] = gasOverheadJuels + callbackCostJuels; + s_withdrawableTokens[msg.sender] += gasOverheadJuels + callbackCostJuels; // Put donFee into the pool of fees, to be split later // Saves on storage writes that would otherwise be charged to the user s_feePool += commitment.donFee; diff --git a/core/gethwrappers/functions/generated/functions_coordinator/functions_coordinator.go b/core/gethwrappers/functions/generated/functions_coordinator/functions_coordinator.go index 07b1b5e1720..f297be99f07 100644 --- a/core/gethwrappers/functions/generated/functions_coordinator/functions_coordinator.go +++ b/core/gethwrappers/functions/generated/functions_coordinator/functions_coordinator.go @@ -40,6 +40,9 @@ type FunctionsBillingConfig struct { MaxSupportedRequestDataVersion uint16 FallbackNativePerUnitLink *big.Int RequestTimeoutSeconds uint32 + OperationFee *big.Int + FallbackUsdPerUnitLink uint64 + FallbackUsdPerUnitLinkDecimals uint8 } type FunctionsResponseCommitment struct { @@ -56,6 +59,21 @@ type FunctionsResponseCommitment struct { TimeoutTimestamp uint32 } +type FunctionsResponseCommitmentWithOperationFee struct { + RequestId [32]byte + Coordinator common.Address + EstimatedTotalCostJuels *big.Int + Client common.Address + SubscriptionId uint64 + CallbackGasLimit uint32 + AdminFee *big.Int + DonFee *big.Int + GasOverheadBeforeCallback *big.Int + GasOverheadAfterCallback *big.Int + TimeoutTimestamp uint32 + OperationFee *big.Int +} + type FunctionsResponseRequestMeta struct { Data []byte Flags [32]byte @@ -71,15 +89,15 @@ type FunctionsResponseRequestMeta struct { } var FunctionsCoordinatorMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"fulfillmentGasPriceOverEstimationBP\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"feedStalenessSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasOverheadBeforeCallback\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasOverheadAfterCallback\",\"type\":\"uint32\"},{\"internalType\":\"uint72\",\"name\":\"donFee\",\"type\":\"uint72\"},{\"internalType\":\"uint40\",\"name\":\"minimumEstimateGasPriceWei\",\"type\":\"uint40\"},{\"internalType\":\"uint16\",\"name\":\"maxSupportedRequestDataVersion\",\"type\":\"uint16\"},{\"internalType\":\"uint224\",\"name\":\"fallbackNativePerUnitLink\",\"type\":\"uint224\"},{\"internalType\":\"uint32\",\"name\":\"requestTimeoutSeconds\",\"type\":\"uint32\"}],\"internalType\":\"structFunctionsBillingConfig\",\"name\":\"config\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"linkToNativeFeed\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"EmptyPublicKey\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InconsistentReportData\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientBalance\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidCalldata\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"message\",\"type\":\"string\"}],\"name\":\"InvalidConfig\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"int256\",\"name\":\"linkWei\",\"type\":\"int256\"}],\"name\":\"InvalidLinkWeiPrice\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidSubscription\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"MustBeSubOwner\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NoTransmittersSet\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByRouter\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByRouterOwner\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PaymentTooLarge\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"message\",\"type\":\"string\"}],\"name\":\"ReportInvalid\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RouterMustBeSet\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnauthorizedPublicKeyChange\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnauthorizedSender\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnsupportedRequestDataVersion\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"requestId\",\"type\":\"bytes32\"}],\"name\":\"CommitmentDeleted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"previousConfigBlockNumber\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"configCount\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"signers\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"transmitters\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"onchainConfig\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"offchainConfigVersion\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"}],\"name\":\"ConfigSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"fulfillmentGasPriceOverEstimationBP\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"feedStalenessSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasOverheadBeforeCallback\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasOverheadAfterCallback\",\"type\":\"uint32\"},{\"internalType\":\"uint72\",\"name\":\"donFee\",\"type\":\"uint72\"},{\"internalType\":\"uint40\",\"name\":\"minimumEstimateGasPriceWei\",\"type\":\"uint40\"},{\"internalType\":\"uint16\",\"name\":\"maxSupportedRequestDataVersion\",\"type\":\"uint16\"},{\"internalType\":\"uint224\",\"name\":\"fallbackNativePerUnitLink\",\"type\":\"uint224\"},{\"internalType\":\"uint32\",\"name\":\"requestTimeoutSeconds\",\"type\":\"uint32\"}],\"indexed\":false,\"internalType\":\"structFunctionsBillingConfig\",\"name\":\"config\",\"type\":\"tuple\"}],\"name\":\"ConfigUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"requestId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"requestingContract\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"requestInitiator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"subscriptionId\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"subscriptionOwner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"dataVersion\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"flags\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"callbackGasLimit\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"requestId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"coordinator\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"estimatedTotalCostJuels\",\"type\":\"uint96\"},{\"internalType\":\"address\",\"name\":\"client\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"subscriptionId\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint72\",\"name\":\"adminFee\",\"type\":\"uint72\"},{\"internalType\":\"uint72\",\"name\":\"donFee\",\"type\":\"uint72\"},{\"internalType\":\"uint40\",\"name\":\"gasOverheadBeforeCallback\",\"type\":\"uint40\"},{\"internalType\":\"uint40\",\"name\":\"gasOverheadAfterCallback\",\"type\":\"uint40\"},{\"internalType\":\"uint32\",\"name\":\"timeoutTimestamp\",\"type\":\"uint32\"}],\"indexed\":false,\"internalType\":\"structFunctionsResponse.Commitment\",\"name\":\"commitment\",\"type\":\"tuple\"}],\"name\":\"OracleRequest\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"requestId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"transmitter\",\"type\":\"address\"}],\"name\":\"OracleResponse\",\"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\":\"bytes32\",\"name\":\"requestId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"juelsPerGas\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"l1FeeShareWei\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"callbackCostJuels\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"totalCostJuels\",\"type\":\"uint96\"}],\"name\":\"RequestBilled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"epoch\",\"type\":\"uint32\"}],\"name\":\"Transmitted\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"requestId\",\"type\":\"bytes32\"}],\"name\":\"deleteCommitment\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"subscriptionId\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"gasPriceWei\",\"type\":\"uint256\"}],\"name\":\"estimateCost\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAdminFee\",\"outputs\":[{\"internalType\":\"uint72\",\"name\":\"\",\"type\":\"uint72\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getConfig\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"fulfillmentGasPriceOverEstimationBP\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"feedStalenessSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasOverheadBeforeCallback\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasOverheadAfterCallback\",\"type\":\"uint32\"},{\"internalType\":\"uint72\",\"name\":\"donFee\",\"type\":\"uint72\"},{\"internalType\":\"uint40\",\"name\":\"minimumEstimateGasPriceWei\",\"type\":\"uint40\"},{\"internalType\":\"uint16\",\"name\":\"maxSupportedRequestDataVersion\",\"type\":\"uint16\"},{\"internalType\":\"uint224\",\"name\":\"fallbackNativePerUnitLink\",\"type\":\"uint224\"},{\"internalType\":\"uint32\",\"name\":\"requestTimeoutSeconds\",\"type\":\"uint32\"}],\"internalType\":\"structFunctionsBillingConfig\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"getDONFee\",\"outputs\":[{\"internalType\":\"uint72\",\"name\":\"\",\"type\":\"uint72\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getDONPublicKey\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getThresholdPublicKey\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getWeiPerUnitLink\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestConfigDetails\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"configCount\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blockNumber\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestConfigDigestAndEpoch\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"scanLogs\",\"type\":\"bool\"},{\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"epoch\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"oracleWithdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"oracleWithdrawAll\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_signers\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"_transmitters\",\"type\":\"address[]\"},{\"internalType\":\"uint8\",\"name\":\"_f\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"_onchainConfig\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"_offchainConfigVersion\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"_offchainConfig\",\"type\":\"bytes\"}],\"name\":\"setConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"donPublicKey\",\"type\":\"bytes\"}],\"name\":\"setDONPublicKey\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"thresholdPublicKey\",\"type\":\"bytes\"}],\"name\":\"setThresholdPublicKey\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"flags\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"requestingContract\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"availableBalance\",\"type\":\"uint96\"},{\"internalType\":\"uint72\",\"name\":\"adminFee\",\"type\":\"uint72\"},{\"internalType\":\"uint64\",\"name\":\"subscriptionId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"initiatedRequests\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"dataVersion\",\"type\":\"uint16\"},{\"internalType\":\"uint64\",\"name\":\"completedRequests\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"subscriptionOwner\",\"type\":\"address\"}],\"internalType\":\"structFunctionsResponse.RequestMeta\",\"name\":\"request\",\"type\":\"tuple\"}],\"name\":\"startRequest\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"requestId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"coordinator\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"estimatedTotalCostJuels\",\"type\":\"uint96\"},{\"internalType\":\"address\",\"name\":\"client\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"subscriptionId\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint72\",\"name\":\"adminFee\",\"type\":\"uint72\"},{\"internalType\":\"uint72\",\"name\":\"donFee\",\"type\":\"uint72\"},{\"internalType\":\"uint40\",\"name\":\"gasOverheadBeforeCallback\",\"type\":\"uint40\"},{\"internalType\":\"uint40\",\"name\":\"gasOverheadAfterCallback\",\"type\":\"uint40\"},{\"internalType\":\"uint32\",\"name\":\"timeoutTimestamp\",\"type\":\"uint32\"}],\"internalType\":\"structFunctionsResponse.Commitment\",\"name\":\"commitment\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[3]\",\"name\":\"reportContext\",\"type\":\"bytes32[3]\"},{\"internalType\":\"bytes\",\"name\":\"report\",\"type\":\"bytes\"},{\"internalType\":\"bytes32[]\",\"name\":\"rs\",\"type\":\"bytes32[]\"},{\"internalType\":\"bytes32[]\",\"name\":\"ss\",\"type\":\"bytes32[]\"},{\"internalType\":\"bytes32\",\"name\":\"rawVs\",\"type\":\"bytes32\"}],\"name\":\"transmit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"transmitters\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"typeAndVersion\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"fulfillmentGasPriceOverEstimationBP\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"feedStalenessSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasOverheadBeforeCallback\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasOverheadAfterCallback\",\"type\":\"uint32\"},{\"internalType\":\"uint72\",\"name\":\"donFee\",\"type\":\"uint72\"},{\"internalType\":\"uint40\",\"name\":\"minimumEstimateGasPriceWei\",\"type\":\"uint40\"},{\"internalType\":\"uint16\",\"name\":\"maxSupportedRequestDataVersion\",\"type\":\"uint16\"},{\"internalType\":\"uint224\",\"name\":\"fallbackNativePerUnitLink\",\"type\":\"uint224\"},{\"internalType\":\"uint32\",\"name\":\"requestTimeoutSeconds\",\"type\":\"uint32\"}],\"internalType\":\"structFunctionsBillingConfig\",\"name\":\"config\",\"type\":\"tuple\"}],\"name\":\"updateConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x60a06040523480156200001157600080fd5b50604051620057a9380380620057a983398101604081905262000034916200046d565b8282828233806000816200008f5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000c257620000c28162000139565b5050506001600160a01b038116620000ed57604051632530e88560e11b815260040160405180910390fd5b6001600160a01b03908116608052600b80549183166c01000000000000000000000000026001600160601b039092169190911790556200012d82620001e4565b5050505050506200062c565b336001600160a01b03821603620001935760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000086565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b620001ee62000342565b80516008805460208401516040808601516060870151608088015160a089015160c08a015161ffff16600160f01b026001600160f01b0364ffffffffff909216600160c81b0264ffffffffff60c81b196001600160481b03909416600160801b0293909316600160801b600160f01b031963ffffffff9586166c010000000000000000000000000263ffffffff60601b19978716680100000000000000000297909716600160401b600160801b0319998716640100000000026001600160401b0319909b169c87169c909c1799909917979097169990991793909317959095169390931793909317929092169390931790915560e0830151610100840151909216600160e01b026001600160e01b0390921691909117600955517f5f32d06f5e83eda3a68e0e964ef2e6af5cb613e8117aa103c2d6bca5f5184862906200033790839062000576565b60405180910390a150565b6200034c6200034e565b565b6000546001600160a01b031633146200034c5760405162461bcd60e51b815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000604482015260640162000086565b80516001600160a01b0381168114620003c257600080fd5b919050565b60405161012081016001600160401b0381118282101715620003f957634e487b7160e01b600052604160045260246000fd5b60405290565b805163ffffffff81168114620003c257600080fd5b80516001600160481b0381168114620003c257600080fd5b805164ffffffffff81168114620003c257600080fd5b805161ffff81168114620003c257600080fd5b80516001600160e01b0381168114620003c257600080fd5b60008060008385036101608112156200048557600080fd5b6200049085620003aa565b935061012080601f1983011215620004a757600080fd5b620004b1620003c7565b9150620004c160208701620003ff565b8252620004d160408701620003ff565b6020830152620004e460608701620003ff565b6040830152620004f760808701620003ff565b60608301526200050a60a0870162000414565b60808301526200051d60c087016200042c565b60a08301526200053060e0870162000442565b60c08301526101006200054581880162000455565b60e084015262000557828801620003ff565b908301525091506200056d6101408501620003aa565b90509250925092565b815163ffffffff908116825260208084015182169083015260408084015182169083015260608084015191821690830152610120820190506080830151620005c960808401826001600160481b03169052565b5060a0830151620005e360a084018264ffffffffff169052565b5060c0830151620005fa60c084018261ffff169052565b5060e08301516200061660e08401826001600160e01b03169052565b506101009283015163ffffffff16919092015290565b6080516151376200067260003960008181610845015281816109d301528181610ca601528181610f3a0152818161104501528181611790015261357001526151376000f3fe608060405234801561001057600080fd5b506004361061018d5760003560e01c806381ff7048116100e3578063c3f909d41161008c578063e3d0e71211610066578063e3d0e71214610560578063e4ddcea614610573578063f2fde38b1461058957600080fd5b8063c3f909d4146103b0578063d227d24514610528578063d328a91e1461055857600080fd5b8063a631571e116100bd578063a631571e1461035d578063afcb95d71461037d578063b1dc65a41461039d57600080fd5b806381ff7048146102b557806385b214cf146103225780638da5cb5b1461033557600080fd5b806366316d8d116101455780637f15e1661161011f5780637f15e16614610285578063814118341461029857806381f1b938146102ad57600080fd5b806366316d8d1461026257806379ba5097146102755780637d4807871461027d57600080fd5b8063181f5a7711610176578063181f5a77146101ba5780632a905ccc1461020c57806359b5b7ac1461022e57600080fd5b8063083a5466146101925780631112dadc146101a7575b600080fd5b6101a56101a0366004613aad565b61059c565b005b6101a56101b5366004613c56565b6105f1565b6101f66040518060400160405280601c81526020017f46756e6374696f6e7320436f6f7264696e61746f722076312e322e300000000081525081565b6040516102039190613d7a565b60405180910390f35b610214610841565b60405168ffffffffffffffffff9091168152602001610203565b61021461023c366004613e1b565b50600854700100000000000000000000000000000000900468ffffffffffffffffff1690565b6101a5610270366004613eaa565b6108d7565b6101a5610a90565b6101a5610b92565b6101a5610293366004613aad565b610d92565b6102a0610de2565b6040516102039190613f34565b6101f6610e51565b6102ff60015460025463ffffffff74010000000000000000000000000000000000000000830481169378010000000000000000000000000000000000000000000000009093041691565b6040805163ffffffff948516815293909216602084015290820152606001610203565b6101a5610330366004613f47565b610f22565b60005460405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610203565b61037061036b366004613f60565b610fd4565b60405161020391906140b5565b604080516001815260006020820181905291810191909152606001610203565b6101a56103ab366004614109565b611175565b61051b6040805161012081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e0810182905261010081019190915250604080516101208101825260085463ffffffff80821683526401000000008204811660208401526801000000000000000082048116938301939093526c01000000000000000000000000810483166060830152700100000000000000000000000000000000810468ffffffffffffffffff166080830152790100000000000000000000000000000000000000000000000000810464ffffffffff1660a08301527e01000000000000000000000000000000000000000000000000000000000000900461ffff1660c08201526009547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff811660e08301527c0100000000000000000000000000000000000000000000000000000000900490911661010082015290565b60405161020391906141c0565b61053b6105363660046142b0565b61178c565b6040516bffffffffffffffffffffffff9091168152602001610203565b6101f66118ec565b6101a561056e3660046143c9565b611943565b61057b6124bf565b604051908152602001610203565b6101a5610597366004614496565b612718565b6105a461272c565b60008190036105df576040517f4f42be3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600d6105ec82848361454c565b505050565b6105f96127af565b80516008805460208401516040808601516060870151608088015160a089015160c08a015161ffff167e01000000000000000000000000000000000000000000000000000000000000027dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff64ffffffffff909216790100000000000000000000000000000000000000000000000000027fffff0000000000ffffffffffffffffffffffffffffffffffffffffffffffffff68ffffffffffffffffff90941670010000000000000000000000000000000002939093167fffff0000000000000000000000000000ffffffffffffffffffffffffffffffff63ffffffff9586166c01000000000000000000000000027fffffffffffffffffffffffffffffffff00000000ffffffffffffffffffffffff9787166801000000000000000002979097167fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff998716640100000000027fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000909b169c87169c909c1799909917979097169990991793909317959095169390931793909317929092169390931790915560e08301516101008401519092167c0100000000000000000000000000000000000000000000000000000000027bffffffffffffffffffffffffffffffffffffffffffffffffffffffff90921691909117600955517f5f32d06f5e83eda3a68e0e964ef2e6af5cb613e8117aa103c2d6bca5f5184862906108369083906141c0565b60405180910390a150565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16632a905ccc6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156108ae573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108d29190614672565b905090565b6108df6127b7565b806bffffffffffffffffffffffff166000036109195750336000908152600a60205260409020546bffffffffffffffffffffffff16610973565b336000908152600a60205260409020546bffffffffffffffffffffffff80831691161015610973576040517ff4d678b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336000908152600a6020526040812080548392906109a09084906bffffffffffffffffffffffff166146be565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055506109f57f000000000000000000000000000000000000000000000000000000000000000090565b6040517f66316d8d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301526bffffffffffffffffffffffff8416602483015291909116906366316d8d90604401600060405180830381600087803b158015610a7457600080fd5b505af1158015610a88573d6000803e3d6000fd5b505050505050565b60015473ffffffffffffffffffffffffffffffffffffffff163314610b16576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064015b60405180910390fd5b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b610b9a6127af565b610ba26127b7565b6000610bac610de2565b905060005b8151811015610d8e576000600a6000848481518110610bd257610bd26146e3565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff168252810191909152604001600020546bffffffffffffffffffffffff1690508015610d7d576000600a6000858581518110610c3157610c316146e3565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550610cc87f000000000000000000000000000000000000000000000000000000000000000090565b73ffffffffffffffffffffffffffffffffffffffff166366316d8d848481518110610cf557610cf56146e3565b6020026020010151836040518363ffffffff1660e01b8152600401610d4a92919073ffffffffffffffffffffffffffffffffffffffff9290921682526bffffffffffffffffffffffff16602082015260400190565b600060405180830381600087803b158015610d6457600080fd5b505af1158015610d78573d6000803e3d6000fd5b505050505b50610d8781614712565b9050610bb1565b5050565b610d9a61272c565b6000819003610dd5576040517f4f42be3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600c6105ec82848361454c565b60606006805480602002602001604051908101604052809291908181526020018280548015610e4757602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311610e1c575b5050505050905090565b6060600d8054610e60906144b3565b9050600003610e9b576040517f4f42be3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600d8054610ea8906144b3565b80601f0160208091040260200160405190810160405280929190818152602001828054610ed4906144b3565b8015610e475780601f10610ef657610100808354040283529160200191610e47565b820191906000526020600020905b815481529060010190602001808311610f0457509395945050505050565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610f91576040517fc41a5b0900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008181526007602052604080822091909155517f8a4b97add3359bd6bcf5e82874363670eb5ad0f7615abddbd0ed0a3a98f0f416906108369083815260200190565b6040805161016081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810182905261012081018290526101408101919091523373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161461109c576040517fc41a5b0900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6110ad6110a88361474a565b612963565b90506110bf6060830160408401614496565b815173ffffffffffffffffffffffffffffffffffffffff91909116907fbf50768ccf13bd0110ca6d53a9c4f1f3271abdd4c24a56878863ed25b20598ff3261110d60c0870160a08801614837565b61111f61016088016101408901614496565b6111298880614854565b61113b6101208b016101008c016148b9565b60208b01356111516101008d0160e08e016148d4565b8b604051611167999897969594939291906148f1565b60405180910390a35b919050565b6000806111828989612e01565b915091508115611193575050611782565b604080518b3580825262ffffff6020808f0135600881901c9290921690840152909290917fb04e63db38c49950639fa09d29872f21f5d49d614f3a969d8adf3d4b52e41a62910160405180910390a16111f08b8b8b8b8b8b612f8a565b60035460009060029061120e9060ff80821691610100900416614999565b61121891906149e1565b611223906001614999565b60ff169050888114611291576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f77726f6e67206e756d626572206f66207369676e6174757265730000000000006044820152606401610b0d565b888714611320576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f7265706f727420727320616e64207373206d757374206265206f66206571756160448201527f6c206c656e6774680000000000000000000000000000000000000000000000006064820152608401610b0d565b3360009081526004602090815260408083208151808301909252805460ff8082168452929391929184019161010090910416600281111561136357611363614a03565b600281111561137457611374614a03565b905250905060028160200151600281111561139157611391614a03565b141580156113da57506006816000015160ff16815481106113b4576113b46146e3565b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff163314155b15611441576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f756e617574686f72697a6564207472616e736d697474657200000000000000006044820152606401610b0d565b5050505061144d613a4c565b60008a8a60405161145f929190614a32565b604051908190038120611476918e90602001614a42565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181528282528051602091820120838301909252600080845290830152915060005b898110156117725760006001848984602081106114df576114df6146e3565b6114ec91901a601b614999565b8e8e868181106114fe576114fe6146e3565b905060200201358d8d87818110611517576115176146e3565b9050602002013560405160008152602001604052604051611554949392919093845260ff9290921660208401526040830152606082015260800190565b6020604051602081039080840390855afa158015611576573d6000803e3d6000fd5b5050604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081015173ffffffffffffffffffffffffffffffffffffffff811660009081526004602090815290849020838501909452835460ff808216855292965092945084019161010090041660028111156115f6576115f6614a03565b600281111561160757611607614a03565b905250925060018360200151600281111561162457611624614a03565b1461168b576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f61646472657373206e6f7420617574686f72697a656420746f207369676e00006044820152606401610b0d565b8251600090869060ff16601f81106116a5576116a56146e3565b602002015173ffffffffffffffffffffffffffffffffffffffff1614611727576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f6e6f6e2d756e69717565207369676e61747572650000000000000000000000006044820152606401610b0d565b8085846000015160ff16601f8110611741576117416146e3565b73ffffffffffffffffffffffffffffffffffffffff90921660209290920201525061176b81614712565b90506114c0565b50505061177e82613041565b5050505b5050505050505050565b60007f00000000000000000000000000000000000000000000000000000000000000006040517f10fc49c100000000000000000000000000000000000000000000000000000000815267ffffffffffffffff8816600482015263ffffffff8516602482015273ffffffffffffffffffffffffffffffffffffffff91909116906310fc49c19060440160006040518083038186803b15801561182c57600080fd5b505afa158015611840573d6000803e3d6000fd5b5050505066038d7ea4c68000821115611885576040517f8129bbcd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061188f610841565b905060006118d287878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061023c92505050565b90506118e085858385613190565b98975050505050505050565b6060600c80546118fb906144b3565b9050600003611936576040517f4f42be3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600c8054610ea8906144b3565b855185518560ff16601f8311156119b6576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f746f6f206d616e79207369676e657273000000000000000000000000000000006044820152606401610b0d565b80600003611a20576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f66206d75737420626520706f73697469766500000000000000000000000000006044820152606401610b0d565b818314611aae576040517f89a61989000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f6f7261636c6520616464726573736573206f7574206f6620726567697374726160448201527f74696f6e000000000000000000000000000000000000000000000000000000006064820152608401610b0d565b611ab9816003614a56565b8311611b21576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f6661756c74792d6f7261636c65206620746f6f206869676800000000000000006044820152606401610b0d565b611b2961272c565b6040805160c0810182528a8152602081018a905260ff89169181018290526060810188905267ffffffffffffffff8716608082015260a0810186905290611b7090886132fd565b60055415611d2557600554600090611b8a90600190614a6d565b9050600060058281548110611ba157611ba16146e3565b60009182526020822001546006805473ffffffffffffffffffffffffffffffffffffffff90921693509084908110611bdb57611bdb6146e3565b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff85811684526004909252604080842080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000090811690915592909116808452922080549091169055600580549192509080611c5b57611c5b614a80565b60008281526020902081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90810180547fffffffffffffffffffffffff00000000000000000000000000000000000000001690550190556006805480611cc457611cc4614a80565b60008281526020902081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90810180547fffffffffffffffffffffffff000000000000000000000000000000000000000016905501905550611b70915050565b60005b8151518110156122dc57815180516000919083908110611d4a57611d4a6146e3565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1603611dcf576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f7369676e6572206d757374206e6f7420626520656d70747900000000000000006044820152606401610b0d565b600073ffffffffffffffffffffffffffffffffffffffff1682602001518281518110611dfd57611dfd6146e3565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1603611e82576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f7472616e736d6974746572206d757374206e6f7420626520656d7074790000006044820152606401610b0d565b60006004600084600001518481518110611e9e57611e9e6146e3565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff16825281019190915260400160002054610100900460ff166002811115611ee857611ee8614a03565b14611f4f576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f7265706561746564207369676e657220616464726573730000000000000000006044820152606401610b0d565b6040805180820190915260ff82168152600160208201528251805160049160009185908110611f8057611f806146e3565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff168252818101929092526040016000208251815460ff9091167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0082168117835592840151919283917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000161761010083600281111561202157612021614a03565b0217905550600091506120319050565b600460008460200151848151811061204b5761204b6146e3565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff16825281019190915260400160002054610100900460ff16600281111561209557612095614a03565b146120fc576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f7265706561746564207472616e736d69747465722061646472657373000000006044820152606401610b0d565b6040805180820190915260ff82168152602081016002815250600460008460200151848151811061212f5761212f6146e3565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff168252818101929092526040016000208251815460ff9091167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0082168117835592840151919283917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000016176101008360028111156121d0576121d0614a03565b0217905550508251805160059250839081106121ee576121ee6146e3565b602090810291909101810151825460018101845560009384529282902090920180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909316929092179091558201518051600691908390811061226a5761226a6146e3565b60209081029190910181015182546001810184556000938452919092200180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909216919091179055806122d481614712565b915050611d28565b506040810151600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660ff909216919091179055600180547fffffffff00000000ffffffffffffffffffffffffffffffffffffffffffffffff8116780100000000000000000000000000000000000000000000000063ffffffff438116820292909217808555920481169291829160149161239491849174010000000000000000000000000000000000000000900416614aaf565b92506101000a81548163ffffffff021916908363ffffffff1602179055506123f34630600160149054906101000a900463ffffffff1663ffffffff16856000015186602001518760400151886060015189608001518a60a00151613316565b600281905582518051600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1661010060ff9093169290920291909117905560015460208501516040808701516060880151608089015160a08a015193517f1591690b8638f5fb2dbec82ac741805ac5da8b45dc5263f4875b0496fdce4e05986124aa988b9891977401000000000000000000000000000000000000000090920463ffffffff16969095919491939192614acc565b60405180910390a15050505050505050505050565b604080516101208101825260085463ffffffff80821683526401000000008204811660208401526801000000000000000082048116838501526c0100000000000000000000000080830482166060850152700100000000000000000000000000000000830468ffffffffffffffffff166080850152790100000000000000000000000000000000000000000000000000830464ffffffffff1660a0808601919091527e0100000000000000000000000000000000000000000000000000000000000090930461ffff1660c08501526009547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff811660e08601527c01000000000000000000000000000000000000000000000000000000009004909116610100840152600b5484517ffeaf968c00000000000000000000000000000000000000000000000000000000815294516000958694859490930473ffffffffffffffffffffffffffffffffffffffff169263feaf968c926004808401938290030181865afa15801561264d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126719190614b7c565b5093505092505080426126849190614a6d565b836020015163ffffffff161080156126a657506000836020015163ffffffff16115b156126d457505060e001517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16919050565b60008213612711576040517f43d4cf6600000000000000000000000000000000000000000000000000000000815260048101839052602401610b0d565b5092915050565b61272061272c565b612729816133c1565b50565b60005473ffffffffffffffffffffffffffffffffffffffff1633146127ad576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401610b0d565b565b6127ad61272c565b600b546bffffffffffffffffffffffff166000036127d157565b60006127db610de2565b8051909150600081900361281b576040517f30274b3a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600b5460009061283a9083906bffffffffffffffffffffffff16614bcc565b905060005b828110156129055781600a600086848151811061285e5761285e6146e3565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282829054906101000a90046bffffffffffffffffffffffff166128c69190614bf7565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550806128fe90614712565b905061283f565b506129108282614c1c565b600b80546000906129309084906bffffffffffffffffffffffff166146be565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550505050565b6040805161016081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e0810182905261010081018290526101208101829052610140810191909152604080516101208101825260085463ffffffff80821683526401000000008204811660208401526801000000000000000082048116938301939093526c0100000000000000000000000081048316606083015268ffffffffffffffffff700100000000000000000000000000000000820416608083015264ffffffffff79010000000000000000000000000000000000000000000000000082041660a083015261ffff7e01000000000000000000000000000000000000000000000000000000000000909104811660c083018190526009547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff811660e08501527c0100000000000000000000000000000000000000000000000000000000900490931661010080840191909152850151919291161115612b1e576040517fdada758700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600854600090700100000000000000000000000000000000900468ffffffffffffffffff1690506000612b5b8560e001513a848860800151613190565b9050806bffffffffffffffffffffffff1685606001516bffffffffffffffffffffffff161015612bb7576040517ff4d678b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600083610100015163ffffffff1642612bd09190614c44565b905060003087604001518860a001518960c001516001612bf09190614c57565b8a5180516020918201206101008d015160e08e0151604051612ca498979695948c918c9132910173ffffffffffffffffffffffffffffffffffffffff9a8b168152988a1660208a015267ffffffffffffffff97881660408a0152959096166060880152608087019390935261ffff9190911660a086015263ffffffff90811660c08601526bffffffffffffffffffffffff9190911660e0850152919091166101008301529091166101208201526101400190565b6040516020818303038152906040528051906020012090506040518061016001604052808281526020013073ffffffffffffffffffffffffffffffffffffffff168152602001846bffffffffffffffffffffffff168152602001886040015173ffffffffffffffffffffffffffffffffffffffff1681526020018860a0015167ffffffffffffffff1681526020018860e0015163ffffffff168152602001886080015168ffffffffffffffffff1681526020018568ffffffffffffffffff168152602001866040015163ffffffff1664ffffffffff168152602001866060015163ffffffff1664ffffffffff1681526020018363ffffffff16815250955085604051602001612db391906140b5565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152918152815160209283012060009384526007909252909120555092949350505050565b6000612e356040518060a0016040528060608152602001606081526020016060815260200160608152602001606081525090565b600080808080612e47888a018a614d53565b84519499509297509095509350915060ff16801580612e67575084518114155b80612e73575083518114155b80612e7f575082518114155b80612e8b575081518114155b15612ef2576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f4669656c6473206d75737420626520657175616c206c656e67746800000000006044820152606401610b0d565b60005b81811015612f5857612f2e878281518110612f1257612f126146e3565b6020026020010151600090815260076020526040902054151590565b612f5857612f3d600183614a6d565b8103612f4857600198505b612f5181614712565b9050612ef5565b50506040805160a0810182529586526020860194909452928401919091526060830152608082015290505b9250929050565b6000612f97826020614a56565b612fa2856020614a56565b612fae88610144614c44565b612fb89190614c44565b612fc29190614c44565b612fcd906000614c44565b9050368114613038576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f63616c6c64617461206c656e677468206d69736d6174636800000000000000006044820152606401610b0d565b50505050505050565b80515160ff1660005b818110156105ec5760006130f38460000151838151811061306d5761306d6146e3565b60200260200101518560200151848151811061308b5761308b6146e3565b6020026020010151866040015185815181106130a9576130a96146e3565b6020026020010151876060015186815181106130c7576130c76146e3565b6020026020010151886080015187815181106130e5576130e56146e3565b6020026020010151886134b6565b9050600081600681111561310957613109614a03565b14806131265750600181600681111561312457613124614a03565b145b1561317f57835180518390811061313f5761313f6146e3565b60209081029190910181015160405133815290917fc708e0440951fd63499c0f7a73819b469ee5dd3ecc356c0ab4eb7f18389009d9910160405180910390a25b5061318981614712565b905061304a565b600854600090790100000000000000000000000000000000000000000000000000900464ffffffffff168410156131eb57600854790100000000000000000000000000000000000000000000000000900464ffffffffff1693505b600854600090612710906132059063ffffffff1687614a56565b61320f9190614e25565b6132199086614c44565b60085490915060009087906132529063ffffffff6c01000000000000000000000000820481169168010000000000000000900416614aaf565b61325c9190614aaf565b63ffffffff16905060006132a66000368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506137ca92505050565b905060006132c7826132b88587614a56565b6132c29190614c44565b61390c565b905060006132e368ffffffffffffffffff808916908a16614bf7565b90506132ef8183614bf7565b9a9950505050505050505050565b6000613307610de2565b511115610d8e57610d8e6127b7565b6000808a8a8a8a8a8a8a8a8a60405160200161333a99989796959493929190614e39565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291905280516020909101207dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e01000000000000000000000000000000000000000000000000000000000000179150509998505050505050505050565b3373ffffffffffffffffffffffffffffffffffffffff821603613440576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401610b0d565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b600080848060200190518101906134cd9190614f05565b905060003a8261012001518361010001516134e89190614fcd565b64ffffffffff166134f99190614a56565b905060008460ff166135416000368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506137ca92505050565b61354b9190614e25565b9050600061355c6132c28385614c44565b905060006135693a61390c565b90506000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663330605298e8e868b60e0015168ffffffffffffffffff16896135c89190614bf7565b338d6040518763ffffffff1660e01b81526004016135eb96959493929190614feb565b60408051808303816000875af1158015613609573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061362d9190615067565b9092509050600082600681111561364657613646614a03565b14806136635750600182600681111561366157613661614a03565b145b156137b95760008e8152600760205260408120556136818185614bf7565b336000908152600a6020526040812080547fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166bffffffffffffffffffffffff93841617905560e0890151600b805468ffffffffffffffffff909216939092916136ed91859116614bf7565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055508d7f90815c2e624694e8010bffad2bcefaf96af282ef1bc2ebc0042d1b89a585e0468487848b60c0015168ffffffffffffffffff168c60e0015168ffffffffffffffffff16878b61376c9190614bf7565b6137769190614bf7565b6137809190614bf7565b604080516bffffffffffffffffffffffff9586168152602081019490945291841683830152909216606082015290519081900360800190a25b509c9b505050505050505050505050565b6000466137d681613940565b1561385257606c73ffffffffffffffffffffffffffffffffffffffff1663c6f7de0e6040518163ffffffff1660e01b8152600401602060405180830381865afa158015613827573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061384b919061509a565b9392505050565b61385b81613963565b156139035773420000000000000000000000000000000000000f73ffffffffffffffffffffffffffffffffffffffff166349948e0e846040518060800160405280604881526020016150e3604891396040516020016138bb9291906150b3565b6040516020818303038152906040526040518263ffffffff1660e01b81526004016138e69190613d7a565b602060405180830381865afa158015613827573d6000803e3d6000fd5b50600092915050565b600061393a6139196124bf565b61392b84670de0b6b3a7640000614a56565b6139359190614e25565b6139aa565b92915050565b600061a4b1821480613954575062066eed82145b8061393a57505062066eee1490565b6000600a82148061397557506101a482145b80613982575062aa37dc82145b8061398e575061210582145b8061399b575062014a3382145b8061393a57505062014a341490565b60006bffffffffffffffffffffffff821115613a48576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203960448201527f36206269747300000000000000000000000000000000000000000000000000006064820152608401610b0d565b5090565b604051806103e00160405280601f906020820280368337509192915050565b60008083601f840112613a7d57600080fd5b50813567ffffffffffffffff811115613a9557600080fd5b602083019150836020828501011115612f8357600080fd5b60008060208385031215613ac057600080fd5b823567ffffffffffffffff811115613ad757600080fd5b613ae385828601613a6b565b90969095509350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051610120810167ffffffffffffffff81118282101715613b4257613b42613aef565b60405290565b604051610160810167ffffffffffffffff81118282101715613b4257613b42613aef565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715613bb357613bb3613aef565b604052919050565b63ffffffff8116811461272957600080fd5b803561117081613bbb565b68ffffffffffffffffff8116811461272957600080fd5b803561117081613bd8565b64ffffffffff8116811461272957600080fd5b803561117081613bfa565b803561ffff8116811461117057600080fd5b80357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8116811461117057600080fd5b60006101208284031215613c6957600080fd5b613c71613b1e565b613c7a83613bcd565b8152613c8860208401613bcd565b6020820152613c9960408401613bcd565b6040820152613caa60608401613bcd565b6060820152613cbb60808401613bef565b6080820152613ccc60a08401613c0d565b60a0820152613cdd60c08401613c18565b60c0820152613cee60e08401613c2a565b60e0820152610100613d01818501613bcd565b908201529392505050565b60005b83811015613d27578181015183820152602001613d0f565b50506000910152565b60008151808452613d48816020860160208601613d0c565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60208152600061384b6020830184613d30565b600082601f830112613d9e57600080fd5b813567ffffffffffffffff811115613db857613db8613aef565b613de960207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601613b6c565b818152846020838601011115613dfe57600080fd5b816020850160208301376000918101602001919091529392505050565b600060208284031215613e2d57600080fd5b813567ffffffffffffffff811115613e4457600080fd5b613e5084828501613d8d565b949350505050565b73ffffffffffffffffffffffffffffffffffffffff8116811461272957600080fd5b803561117081613e58565b6bffffffffffffffffffffffff8116811461272957600080fd5b803561117081613e85565b60008060408385031215613ebd57600080fd5b8235613ec881613e58565b91506020830135613ed881613e85565b809150509250929050565b600081518084526020808501945080840160005b83811015613f2957815173ffffffffffffffffffffffffffffffffffffffff1687529582019590820190600101613ef7565b509495945050505050565b60208152600061384b6020830184613ee3565b600060208284031215613f5957600080fd5b5035919050565b600060208284031215613f7257600080fd5b813567ffffffffffffffff811115613f8957600080fd5b8201610160818503121561384b57600080fd5b805182526020810151613fc7602084018273ffffffffffffffffffffffffffffffffffffffff169052565b506040810151613fe760408401826bffffffffffffffffffffffff169052565b50606081015161400f606084018273ffffffffffffffffffffffffffffffffffffffff169052565b50608081015161402b608084018267ffffffffffffffff169052565b5060a081015161404360a084018263ffffffff169052565b5060c081015161406060c084018268ffffffffffffffffff169052565b5060e081015161407d60e084018268ffffffffffffffffff169052565b506101008181015164ffffffffff9081169184019190915261012080830151909116908301526101409081015163ffffffff16910152565b610160810161393a8284613f9c565b60008083601f8401126140d657600080fd5b50813567ffffffffffffffff8111156140ee57600080fd5b6020830191508360208260051b8501011115612f8357600080fd5b60008060008060008060008060e0898b03121561412557600080fd5b606089018a81111561413657600080fd5b8998503567ffffffffffffffff8082111561415057600080fd5b61415c8c838d01613a6b565b909950975060808b013591508082111561417557600080fd5b6141818c838d016140c4565b909750955060a08b013591508082111561419a57600080fd5b506141a78b828c016140c4565b999c989b50969995989497949560c00135949350505050565b815163ffffffff908116825260208084015182169083015260408084015182169083015260608084015191821690830152610120820190506080830151614214608084018268ffffffffffffffffff169052565b5060a083015161422d60a084018264ffffffffff169052565b5060c083015161424360c084018261ffff169052565b5060e083015161427360e08401827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff169052565b506101008381015163ffffffff8116848301525b505092915050565b67ffffffffffffffff8116811461272957600080fd5b80356111708161428f565b6000806000806000608086880312156142c857600080fd5b85356142d38161428f565b9450602086013567ffffffffffffffff8111156142ef57600080fd5b6142fb88828901613a6b565b909550935050604086013561430f81613bbb565b949793965091946060013592915050565b600067ffffffffffffffff82111561433a5761433a613aef565b5060051b60200190565b600082601f83011261435557600080fd5b8135602061436a61436583614320565b613b6c565b82815260059290921b8401810191818101908684111561438957600080fd5b8286015b848110156143ad5780356143a081613e58565b835291830191830161438d565b509695505050505050565b803560ff8116811461117057600080fd5b60008060008060008060c087890312156143e257600080fd5b863567ffffffffffffffff808211156143fa57600080fd5b6144068a838b01614344565b9750602089013591508082111561441c57600080fd5b6144288a838b01614344565b965061443660408a016143b8565b9550606089013591508082111561444c57600080fd5b6144588a838b01613d8d565b945061446660808a016142a5565b935060a089013591508082111561447c57600080fd5b5061448989828a01613d8d565b9150509295509295509295565b6000602082840312156144a857600080fd5b813561384b81613e58565b600181811c908216806144c757607f821691505b602082108103614500577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b601f8211156105ec57600081815260208120601f850160051c8101602086101561452d5750805b601f850160051c820191505b81811015610a8857828155600101614539565b67ffffffffffffffff83111561456457614564613aef565b6145788361457283546144b3565b83614506565b6000601f8411600181146145ca57600085156145945750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b178355614660565b6000838152602090207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0861690835b8281101561461957868501358255602094850194600190920191016145f9565b5086821015614654577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b805161117081613bd8565b60006020828403121561468457600080fd5b815161384b81613bd8565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6bffffffffffffffffffffffff8281168282160390808211156127115761271161468f565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036147435761474361468f565b5060010190565b6000610160823603121561475d57600080fd5b614765613b48565b823567ffffffffffffffff81111561477c57600080fd5b61478836828601613d8d565b825250602083013560208201526147a160408401613e7a565b60408201526147b260608401613e9f565b60608201526147c360808401613bef565b60808201526147d460a084016142a5565b60a08201526147e560c084016142a5565b60c08201526147f660e08401613bcd565b60e0820152610100614809818501613c18565b9082015261012061481b8482016142a5565b9082015261014061482d848201613e7a565b9082015292915050565b60006020828403121561484957600080fd5b813561384b8161428f565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261488957600080fd5b83018035915067ffffffffffffffff8211156148a457600080fd5b602001915036819003821315612f8357600080fd5b6000602082840312156148cb57600080fd5b61384b82613c18565b6000602082840312156148e657600080fd5b813561384b81613bbb565b73ffffffffffffffffffffffffffffffffffffffff8a8116825267ffffffffffffffff8a166020830152881660408201526102406060820181905281018690526000610260878982850137600083890182015261ffff8716608084015260a0830186905263ffffffff851660c0840152601f88017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01683010190506132ef60e0830184613f9c565b60ff818116838216019081111561393a5761393a61468f565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600060ff8316806149f4576149f46149b2565b8060ff84160491505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b8183823760009101908152919050565b828152606082602083013760800192915050565b808202811582820484141761393a5761393a61468f565b8181038181111561393a5761393a61468f565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b63ffffffff8181168382160190808211156127115761271161468f565b600061012063ffffffff808d1684528b6020850152808b16604085015250806060840152614afc8184018a613ee3565b90508281036080840152614b108189613ee3565b905060ff871660a084015282810360c0840152614b2d8187613d30565b905067ffffffffffffffff851660e0840152828103610100840152614b528185613d30565b9c9b505050505050505050505050565b805169ffffffffffffffffffff8116811461117057600080fd5b600080600080600060a08688031215614b9457600080fd5b614b9d86614b62565b9450602086015193506040860151925060608601519150614bc060808701614b62565b90509295509295909350565b60006bffffffffffffffffffffffff80841680614beb57614beb6149b2565b92169190910492915050565b6bffffffffffffffffffffffff8181168382160190808211156127115761271161468f565b6bffffffffffffffffffffffff8181168382160280821691908281146142875761428761468f565b8082018082111561393a5761393a61468f565b67ffffffffffffffff8181168382160190808211156127115761271161468f565b600082601f830112614c8957600080fd5b81356020614c9961436583614320565b82815260059290921b84018101918181019086841115614cb857600080fd5b8286015b848110156143ad5780358352918301918301614cbc565b600082601f830112614ce457600080fd5b81356020614cf461436583614320565b82815260059290921b84018101918181019086841115614d1357600080fd5b8286015b848110156143ad57803567ffffffffffffffff811115614d375760008081fd5b614d458986838b0101613d8d565b845250918301918301614d17565b600080600080600060a08688031215614d6b57600080fd5b853567ffffffffffffffff80821115614d8357600080fd5b614d8f89838a01614c78565b96506020880135915080821115614da557600080fd5b614db189838a01614cd3565b95506040880135915080821115614dc757600080fd5b614dd389838a01614cd3565b94506060880135915080821115614de957600080fd5b614df589838a01614cd3565b93506080880135915080821115614e0b57600080fd5b50614e1888828901614cd3565b9150509295509295909350565b600082614e3457614e346149b2565b500490565b60006101208b835273ffffffffffffffffffffffffffffffffffffffff8b16602084015267ffffffffffffffff808b166040850152816060850152614e808285018b613ee3565b91508382036080850152614e94828a613ee3565b915060ff881660a085015283820360c0850152614eb18288613d30565b90861660e08501528381036101008501529050614b528185613d30565b805161117081613e58565b805161117081613e85565b80516111708161428f565b805161117081613bbb565b805161117081613bfa565b60006101608284031215614f1857600080fd5b614f20613b48565b82518152614f3060208401614ece565b6020820152614f4160408401614ed9565b6040820152614f5260608401614ece565b6060820152614f6360808401614ee4565b6080820152614f7460a08401614eef565b60a0820152614f8560c08401614667565b60c0820152614f9660e08401614667565b60e0820152610100614fa9818501614efa565b90820152610120614fbb848201614efa565b90820152610140613d01848201614eef565b64ffffffffff8181168382160190808211156127115761271161468f565b6000610200808352614fff8184018a613d30565b905082810360208401526150138189613d30565b6bffffffffffffffffffffffff88811660408601528716606085015273ffffffffffffffffffffffffffffffffffffffff86166080850152915061505c905060a0830184613f9c565b979650505050505050565b6000806040838503121561507a57600080fd5b82516007811061508957600080fd5b6020840151909250613ed881613e85565b6000602082840312156150ac57600080fd5b5051919050565b600083516150c5818460208801613d0c565b8351908301906150d9818360208801613d0c565b0194935050505056fe307866666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666a164736f6c6343000813000a", + ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"fulfillmentGasPriceOverEstimationBP\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"feedStalenessSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasOverheadBeforeCallback\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasOverheadAfterCallback\",\"type\":\"uint32\"},{\"internalType\":\"uint72\",\"name\":\"donFee\",\"type\":\"uint72\"},{\"internalType\":\"uint40\",\"name\":\"minimumEstimateGasPriceWei\",\"type\":\"uint40\"},{\"internalType\":\"uint16\",\"name\":\"maxSupportedRequestDataVersion\",\"type\":\"uint16\"},{\"internalType\":\"uint224\",\"name\":\"fallbackNativePerUnitLink\",\"type\":\"uint224\"},{\"internalType\":\"uint32\",\"name\":\"requestTimeoutSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint72\",\"name\":\"operationFee\",\"type\":\"uint72\"},{\"internalType\":\"uint64\",\"name\":\"fallbackUsdPerUnitLink\",\"type\":\"uint64\"},{\"internalType\":\"uint8\",\"name\":\"fallbackUsdPerUnitLinkDecimals\",\"type\":\"uint8\"}],\"internalType\":\"structFunctionsBillingConfig\",\"name\":\"config\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"linkToNativeFeed\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"linkToUsdFeed\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"EmptyPublicKey\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InconsistentReportData\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientBalance\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidCalldata\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"message\",\"type\":\"string\"}],\"name\":\"InvalidConfig\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"int256\",\"name\":\"linkWei\",\"type\":\"int256\"}],\"name\":\"InvalidLinkWeiPrice\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidSubscription\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"int256\",\"name\":\"usdLink\",\"type\":\"int256\"}],\"name\":\"InvalidUsdLinkPrice\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"MustBeSubOwner\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NoTransmittersSet\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByRouter\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByRouterOwner\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PaymentTooLarge\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"message\",\"type\":\"string\"}],\"name\":\"ReportInvalid\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RouterMustBeSet\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnauthorizedPublicKeyChange\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnauthorizedSender\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnsupportedRequestDataVersion\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"requestId\",\"type\":\"bytes32\"}],\"name\":\"CommitmentDeleted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"previousConfigBlockNumber\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"configCount\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"signers\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"transmitters\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"onchainConfig\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"offchainConfigVersion\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"}],\"name\":\"ConfigSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"fulfillmentGasPriceOverEstimationBP\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"feedStalenessSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasOverheadBeforeCallback\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasOverheadAfterCallback\",\"type\":\"uint32\"},{\"internalType\":\"uint72\",\"name\":\"donFee\",\"type\":\"uint72\"},{\"internalType\":\"uint40\",\"name\":\"minimumEstimateGasPriceWei\",\"type\":\"uint40\"},{\"internalType\":\"uint16\",\"name\":\"maxSupportedRequestDataVersion\",\"type\":\"uint16\"},{\"internalType\":\"uint224\",\"name\":\"fallbackNativePerUnitLink\",\"type\":\"uint224\"},{\"internalType\":\"uint32\",\"name\":\"requestTimeoutSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint72\",\"name\":\"operationFee\",\"type\":\"uint72\"},{\"internalType\":\"uint64\",\"name\":\"fallbackUsdPerUnitLink\",\"type\":\"uint64\"},{\"internalType\":\"uint8\",\"name\":\"fallbackUsdPerUnitLinkDecimals\",\"type\":\"uint8\"}],\"indexed\":false,\"internalType\":\"structFunctionsBillingConfig\",\"name\":\"config\",\"type\":\"tuple\"}],\"name\":\"ConfigUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"requestId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"requestingContract\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"requestInitiator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"subscriptionId\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"subscriptionOwner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"dataVersion\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"flags\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"callbackGasLimit\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"requestId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"coordinator\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"estimatedTotalCostJuels\",\"type\":\"uint96\"},{\"internalType\":\"address\",\"name\":\"client\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"subscriptionId\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint72\",\"name\":\"adminFee\",\"type\":\"uint72\"},{\"internalType\":\"uint72\",\"name\":\"donFee\",\"type\":\"uint72\"},{\"internalType\":\"uint40\",\"name\":\"gasOverheadBeforeCallback\",\"type\":\"uint40\"},{\"internalType\":\"uint40\",\"name\":\"gasOverheadAfterCallback\",\"type\":\"uint40\"},{\"internalType\":\"uint32\",\"name\":\"timeoutTimestamp\",\"type\":\"uint32\"},{\"internalType\":\"uint72\",\"name\":\"operationFee\",\"type\":\"uint72\"}],\"indexed\":false,\"internalType\":\"structFunctionsResponse.CommitmentWithOperationFee\",\"name\":\"commitment\",\"type\":\"tuple\"}],\"name\":\"OracleRequest\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"requestId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"transmitter\",\"type\":\"address\"}],\"name\":\"OracleResponse\",\"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\":\"bytes32\",\"name\":\"requestId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"juelsPerGas\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"l1FeeShareWei\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"callbackCostJuels\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint72\",\"name\":\"donFee\",\"type\":\"uint72\"},{\"indexed\":false,\"internalType\":\"uint72\",\"name\":\"adminFee\",\"type\":\"uint72\"},{\"indexed\":false,\"internalType\":\"uint72\",\"name\":\"operationFee\",\"type\":\"uint72\"}],\"name\":\"RequestBilled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"epoch\",\"type\":\"uint32\"}],\"name\":\"Transmitted\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"requestId\",\"type\":\"bytes32\"}],\"name\":\"deleteCommitment\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"subscriptionId\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"gasPriceWei\",\"type\":\"uint256\"}],\"name\":\"estimateCost\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAdminFee\",\"outputs\":[{\"internalType\":\"uint72\",\"name\":\"\",\"type\":\"uint72\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getConfig\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"fulfillmentGasPriceOverEstimationBP\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"feedStalenessSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasOverheadBeforeCallback\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasOverheadAfterCallback\",\"type\":\"uint32\"},{\"internalType\":\"uint72\",\"name\":\"donFee\",\"type\":\"uint72\"},{\"internalType\":\"uint40\",\"name\":\"minimumEstimateGasPriceWei\",\"type\":\"uint40\"},{\"internalType\":\"uint16\",\"name\":\"maxSupportedRequestDataVersion\",\"type\":\"uint16\"},{\"internalType\":\"uint224\",\"name\":\"fallbackNativePerUnitLink\",\"type\":\"uint224\"},{\"internalType\":\"uint32\",\"name\":\"requestTimeoutSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint72\",\"name\":\"operationFee\",\"type\":\"uint72\"},{\"internalType\":\"uint64\",\"name\":\"fallbackUsdPerUnitLink\",\"type\":\"uint64\"},{\"internalType\":\"uint8\",\"name\":\"fallbackUsdPerUnitLinkDecimals\",\"type\":\"uint8\"}],\"internalType\":\"structFunctionsBillingConfig\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"getDONFee\",\"outputs\":[{\"internalType\":\"uint72\",\"name\":\"\",\"type\":\"uint72\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getDONPublicKey\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getOperationFee\",\"outputs\":[{\"internalType\":\"uint72\",\"name\":\"\",\"type\":\"uint72\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getThresholdPublicKey\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getUsdPerUnitLink\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getWeiPerUnitLink\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestConfigDetails\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"configCount\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blockNumber\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestConfigDigestAndEpoch\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"scanLogs\",\"type\":\"bool\"},{\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"epoch\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"oracleWithdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"oracleWithdrawAll\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_signers\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"_transmitters\",\"type\":\"address[]\"},{\"internalType\":\"uint8\",\"name\":\"_f\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"_onchainConfig\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"_offchainConfigVersion\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"_offchainConfig\",\"type\":\"bytes\"}],\"name\":\"setConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"donPublicKey\",\"type\":\"bytes\"}],\"name\":\"setDONPublicKey\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"thresholdPublicKey\",\"type\":\"bytes\"}],\"name\":\"setThresholdPublicKey\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"flags\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"requestingContract\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"availableBalance\",\"type\":\"uint96\"},{\"internalType\":\"uint72\",\"name\":\"adminFee\",\"type\":\"uint72\"},{\"internalType\":\"uint64\",\"name\":\"subscriptionId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"initiatedRequests\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"dataVersion\",\"type\":\"uint16\"},{\"internalType\":\"uint64\",\"name\":\"completedRequests\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"subscriptionOwner\",\"type\":\"address\"}],\"internalType\":\"structFunctionsResponse.RequestMeta\",\"name\":\"request\",\"type\":\"tuple\"}],\"name\":\"startRequest\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"requestId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"coordinator\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"estimatedTotalCostJuels\",\"type\":\"uint96\"},{\"internalType\":\"address\",\"name\":\"client\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"subscriptionId\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint72\",\"name\":\"adminFee\",\"type\":\"uint72\"},{\"internalType\":\"uint72\",\"name\":\"donFee\",\"type\":\"uint72\"},{\"internalType\":\"uint40\",\"name\":\"gasOverheadBeforeCallback\",\"type\":\"uint40\"},{\"internalType\":\"uint40\",\"name\":\"gasOverheadAfterCallback\",\"type\":\"uint40\"},{\"internalType\":\"uint32\",\"name\":\"timeoutTimestamp\",\"type\":\"uint32\"}],\"internalType\":\"structFunctionsResponse.Commitment\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[3]\",\"name\":\"reportContext\",\"type\":\"bytes32[3]\"},{\"internalType\":\"bytes\",\"name\":\"report\",\"type\":\"bytes\"},{\"internalType\":\"bytes32[]\",\"name\":\"rs\",\"type\":\"bytes32[]\"},{\"internalType\":\"bytes32[]\",\"name\":\"ss\",\"type\":\"bytes32[]\"},{\"internalType\":\"bytes32\",\"name\":\"rawVs\",\"type\":\"bytes32\"}],\"name\":\"transmit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"transmitters\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"typeAndVersion\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"fulfillmentGasPriceOverEstimationBP\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"feedStalenessSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasOverheadBeforeCallback\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasOverheadAfterCallback\",\"type\":\"uint32\"},{\"internalType\":\"uint72\",\"name\":\"donFee\",\"type\":\"uint72\"},{\"internalType\":\"uint40\",\"name\":\"minimumEstimateGasPriceWei\",\"type\":\"uint40\"},{\"internalType\":\"uint16\",\"name\":\"maxSupportedRequestDataVersion\",\"type\":\"uint16\"},{\"internalType\":\"uint224\",\"name\":\"fallbackNativePerUnitLink\",\"type\":\"uint224\"},{\"internalType\":\"uint32\",\"name\":\"requestTimeoutSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint72\",\"name\":\"operationFee\",\"type\":\"uint72\"},{\"internalType\":\"uint64\",\"name\":\"fallbackUsdPerUnitLink\",\"type\":\"uint64\"},{\"internalType\":\"uint8\",\"name\":\"fallbackUsdPerUnitLinkDecimals\",\"type\":\"uint8\"}],\"internalType\":\"structFunctionsBillingConfig\",\"name\":\"config\",\"type\":\"tuple\"}],\"name\":\"updateConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x60a06040523480156200001157600080fd5b50604051620065e6380380620065e6833981016040819052620000349162000504565b83838383833380600081620000905760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000c357620000c3816200014e565b5050506001600160a01b038116620000ee57604051632530e88560e11b815260040160405180910390fd5b6001600160a01b03908116608052600c80546001600160601b03166c0100000000000000000000000085841602179055600d80546001600160a01b0319169183169190911790556200014083620001f9565b505050505050505062000773565b336001600160a01b03821603620001a85760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000087565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b62000203620003af565b80516008805460208401516040808601516060870151608088015160a089015160c08a015161ffff16600160f01b026001600160f01b0364ffffffffff909216600160c81b0264ffffffffff60c81b196001600160481b03948516600160801b0216600160801b600160f01b031963ffffffff9687166c010000000000000000000000000263ffffffff60601b19988816680100000000000000000298909816600160401b600160801b03199a8816640100000000026001600160401b0319909c169d88169d909d179a909a17989098169a909a1794909417969096169490941796909617939093169290921790925560e0840151610100850151909316600160e01b026001600160e01b0390931692909217600955610120830151600a805461014086015161016087015160ff16600160881b0260ff60881b196001600160401b039092166901000000000000000000026001600160881b031990931694909516939093171791909116919091179055517f165999a4d7499227f20106b83c79a73315af2ecd639138d441db651c5f635e8690620003a490839062000662565b60405180910390a150565b620003b9620003bb565b565b6000546001600160a01b03163314620003b95760405162461bcd60e51b815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000604482015260640162000087565b80516001600160a01b03811681146200042f57600080fd5b919050565b60405161018081016001600160401b03811182821017156200046657634e487b7160e01b600052604160045260246000fd5b60405290565b805163ffffffff811681146200042f57600080fd5b80516001600160481b03811681146200042f57600080fd5b805164ffffffffff811681146200042f57600080fd5b805161ffff811681146200042f57600080fd5b80516001600160e01b03811681146200042f57600080fd5b80516001600160401b03811681146200042f57600080fd5b805160ff811681146200042f57600080fd5b6000806000808486036101e08112156200051d57600080fd5b620005288662000417565b945061018080601f19830112156200053f57600080fd5b6200054962000434565b915062000559602088016200046c565b825262000569604088016200046c565b60208301526200057c606088016200046c565b60408301526200058f608088016200046c565b6060830152620005a260a0880162000481565b6080830152620005b560c0880162000499565b60a0830152620005c860e08801620004af565b60c0830152610100620005dd818901620004c2565b60e0840152610120620005f2818a016200046c565b82850152610140915062000608828a0162000481565b908401526101606200061c898201620004da565b828501526200062d838a01620004f2565b90840152509093506200064690506101a0860162000417565b9150620006576101c0860162000417565b905092959194509250565b815163ffffffff1681526101808101602083015162000689602084018263ffffffff169052565b506040830151620006a2604084018263ffffffff169052565b506060830151620006bb606084018263ffffffff169052565b506080830151620006d760808401826001600160481b03169052565b5060a0830151620006f160a084018264ffffffffff169052565b5060c08301516200070860c084018261ffff169052565b5060e08301516200072460e08401826001600160e01b03169052565b506101008381015163ffffffff1690830152610120808401516001600160481b031690830152610140808401516001600160401b0316908301526101609283015160ff16929091019190915290565b608051615e2d620007b9600039600081816106740152818161085a01528181610e63015281816110f70152818161120d01528181611a4c0152613d8c0152615e2d6000f3fe608060405234801561001057600080fd5b50600436106101a35760003560e01c806385b214cf116100ee578063d227d24511610097578063e3d0e71211610071578063e3d0e712146105d7578063e4ddcea6146105ea578063ec2c65c114610600578063f2fde38b1461060857600080fd5b8063d227d2451461058c578063d328a91e146105bc578063dd967201146105c457600080fd5b8063afcb95d7116100c8578063afcb95d71461037e578063b1dc65a41461039e578063c3f909d4146103b157600080fd5b806385b214cf146103235780638da5cb5b14610336578063a631571e1461035e57600080fd5b806379ba509711610150578063814118341161012a578063814118341461029957806381f1b938146102ae57806381ff7048146102b657600080fd5b806379ba5097146102765780637d4807871461027e5780637f15e1661461028657600080fd5b806359b5b7ac1161018157806359b5b7ac1461023157806366316d8d146102445780637212762f1461025757600080fd5b8063083a5466146101a8578063181f5a77146101bd5780632a905ccc1461020f575b600080fd5b6101bb6101b636600461443c565b61061b565b005b6101f96040518060400160405280601c81526020017f46756e6374696f6e7320436f6f7264696e61746f722076322e302e300000000081525081565b60405161020691906144ec565b60405180910390f35b610217610670565b60405168ffffffffffffffffff9091168152602001610206565b61021761023f366004614659565b610706565b6101bb6102523660046146e0565b61075e565b61025f610917565b6040805192835260ff909116602083015201610206565b6101bb610c52565b6101bb610d4f565b6101bb61029436600461443c565b610f4f565b6102a1610f9f565b604051610206919061476a565b6101f961100e565b61030060015460025463ffffffff74010000000000000000000000000000000000000000830481169378010000000000000000000000000000000000000000000000009093041691565b6040805163ffffffff948516815293909216602084015290820152606001610206565b6101bb61033136600461477d565b6110df565b60005460405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610206565b61037161036c366004614796565b61119c565b60405161020691906148f7565b604080516001815260006020820181905291810191909152606001610206565b6101bb6103ac36600461494b565b611431565b61057f6040805161018081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e0810182905261010081018290526101208101829052610140810182905261016081019190915250604080516101808101825260085463ffffffff80821683526401000000008204811660208401526801000000000000000082048116938301939093526c01000000000000000000000000810483166060830152700100000000000000000000000000000000810468ffffffffffffffffff9081166080840152790100000000000000000000000000000000000000000000000000820464ffffffffff1660a08401527e0100000000000000000000000000000000000000000000000000000000000090910461ffff1660c08301526009547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff811660e08401527c01000000000000000000000000000000000000000000000000000000009004909216610100820152600a549182166101208201526901000000000000000000820467ffffffffffffffff166101408201527101000000000000000000000000000000000090910460ff1661016082015290565b6040516102069190614a02565b61059f61059a366004614b67565b611a48565b6040516bffffffffffffffffffffffff9091168152602001610206565b6101f9611bb6565b6101bb6105d2366004614c6f565b611c0d565b6101bb6105e5366004614df3565b611eec565b6105f2612a68565b604051908152602001610206565b610217612d0b565b6101bb610616366004614ec0565b612d2c565b610623612d40565b600081900361065e576040517f4f42be3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600f61066b828483614f76565b505050565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16632a905ccc6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106dd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610701919061509c565b905090565b6008546000906107589060649061073b90700100000000000000000000000000000000900468ffffffffffffffffff16612dc3565b6107459190615117565b6bffffffffffffffffffffffff16612e10565b92915050565b610766612eaf565b806bffffffffffffffffffffffff166000036107a05750336000908152600b60205260409020546bffffffffffffffffffffffff166107fa565b336000908152600b60205260409020546bffffffffffffffffffffffff808316911610156107fa576040517ff4d678b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336000908152600b6020526040812080548392906108279084906bffffffffffffffffffffffff16615142565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff16021790555061087c7f000000000000000000000000000000000000000000000000000000000000000090565b6040517f66316d8d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301526bffffffffffffffffffffffff8416602483015291909116906366316d8d90604401600060405180830381600087803b1580156108fb57600080fd5b505af115801561090f573d6000803e3d6000fd5b505050505050565b604080516101808101825260085463ffffffff80821683526401000000008204811660208401526801000000000000000082048116838501526c01000000000000000000000000820481166060840152700100000000000000000000000000000000820468ffffffffffffffffff9081166080850152790100000000000000000000000000000000000000000000000000830464ffffffffff1660a0808601919091527e0100000000000000000000000000000000000000000000000000000000000090930461ffff1660c08501526009547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff811660e08601527c01000000000000000000000000000000000000000000000000000000009004909116610100840152600a549081166101208401526901000000000000000000810467ffffffffffffffff1661014084015271010000000000000000000000000000000000900460ff16610160830152600d5483517ffeaf968c00000000000000000000000000000000000000000000000000000000815293516000948594938593849373ffffffffffffffffffffffffffffffffffffffff9091169263feaf968c9260048083019391928290030181865afa158015610af1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b159190615181565b509350509250508042610b2891906151d1565b836020015163ffffffff16108015610b4a57506000836020015163ffffffff16115b15610b725750506101408101516101609091015167ffffffffffffffff909116939092509050565b60008213610bb4576040517f56b22ab8000000000000000000000000000000000000000000000000000000008152600481018390526024015b60405180910390fd5b600d54604080517f313ce5670000000000000000000000000000000000000000000000000000000081529051849273ffffffffffffffffffffffffffffffffffffffff169163313ce5679160048083019260209291908290030181865afa158015610c23573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c4791906151e4565b945094505050509091565b60015473ffffffffffffffffffffffffffffffffffffffff163314610cd3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e6572000000000000000000006044820152606401610bab565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b610d5761305b565b610d5f612eaf565b6000610d69610f9f565b905060005b8151811015610f4b576000600b6000848481518110610d8f57610d8f615201565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff168252810191909152604001600020546bffffffffffffffffffffffff1690508015610f3a576000600b6000858581518110610dee57610dee615201565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550610e857f000000000000000000000000000000000000000000000000000000000000000090565b73ffffffffffffffffffffffffffffffffffffffff166366316d8d848481518110610eb257610eb2615201565b6020026020010151836040518363ffffffff1660e01b8152600401610f0792919073ffffffffffffffffffffffffffffffffffffffff9290921682526bffffffffffffffffffffffff16602082015260400190565b600060405180830381600087803b158015610f2157600080fd5b505af1158015610f35573d6000803e3d6000fd5b505050505b50610f4481615230565b9050610d6e565b5050565b610f57612d40565b6000819003610f92576040517f4f42be3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600e61066b828483614f76565b6060600680548060200260200160405190810160405280929190818152602001828054801561100457602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311610fd9575b5050505050905090565b6060600f805461101d90614edd565b9050600003611058576040517f4f42be3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600f805461106590614edd565b80601f016020809104026020016040519081016040528092919081815260200182805461109190614edd565b80156110045780601f106110b357610100808354040283529160200191611004565b820191906000526020600020905b8154815290600101906020018083116110c157509395945050505050565b3373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161461114e576040517fc41a5b0900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008181526007602052604080822091909155517f8a4b97add3359bd6bcf5e82874363670eb5ad0f7615abddbd0ed0a3a98f0f416906111919083815260200190565b60405180910390a150565b6040805161016081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810182905261012081018290526101408101919091523373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614611264576040517fc41a5b0900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061127761127284615268565b613063565b90506112896060840160408501614ec0565b815173ffffffffffffffffffffffffffffffffffffffff91909116907f718684b6c135c1277575a7b5c7365bc9587d5ebfd899230d5fa11360f6143bfb326112d760c0880160a08901615355565b6112e961016089016101408a01614ec0565b6112f38980615372565b6113056101208c016101008d016153d7565b60208c013561131b6101008e0160e08f016153f2565b8b60405161133199989796959493929190615543565b60405180910390a360405180610160016040528082600001518152602001826020015173ffffffffffffffffffffffffffffffffffffffff16815260200182604001516bffffffffffffffffffffffff168152602001826060015173ffffffffffffffffffffffffffffffffffffffff168152602001826080015167ffffffffffffffff1681526020018260a0015163ffffffff1681526020018260c0015168ffffffffffffffffff1681526020018260e0015168ffffffffffffffffff16815260200182610100015164ffffffffff16815260200182610120015164ffffffffff16815260200182610140015163ffffffff168152509150505b919050565b60008061143e898961355e565b91509150811561144f575050611a3e565b604080518b3580825262ffffff6020808f0135600881901c9290921690840152909290917fb04e63db38c49950639fa09d29872f21f5d49d614f3a969d8adf3d4b52e41a62910160405180910390a16114ac8b8b8b8b8b8b6136e7565b6003546000906002906114ca9060ff808216916101009004166155f9565b6114d49190615612565b6114df9060016155f9565b60ff16905088811461154d576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f77726f6e67206e756d626572206f66207369676e6174757265730000000000006044820152606401610bab565b8887146115dc576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f7265706f727420727320616e64207373206d757374206265206f66206571756160448201527f6c206c656e6774680000000000000000000000000000000000000000000000006064820152608401610bab565b3360009081526004602090815260408083208151808301909252805460ff8082168452929391929184019161010090910416600281111561161f5761161f615634565b600281111561163057611630615634565b905250905060028160200151600281111561164d5761164d615634565b1415801561169657506006816000015160ff168154811061167057611670615201565b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff163314155b156116fd576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f756e617574686f72697a6564207472616e736d697474657200000000000000006044820152606401610bab565b505050506117096143db565b60008a8a60405161171b929190615663565b604051908190038120611732918e90602001615673565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181528282528051602091820120838301909252600080845290830152915060005b89811015611a2e57600060018489846020811061179b5761179b615201565b6117a891901a601b6155f9565b8e8e868181106117ba576117ba615201565b905060200201358d8d878181106117d3576117d3615201565b9050602002013560405160008152602001604052604051611810949392919093845260ff9290921660208401526040830152606082015260800190565b6020604051602081039080840390855afa158015611832573d6000803e3d6000fd5b5050604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081015173ffffffffffffffffffffffffffffffffffffffff811660009081526004602090815290849020838501909452835460ff808216855292965092945084019161010090041660028111156118b2576118b2615634565b60028111156118c3576118c3615634565b90525092506001836020015160028111156118e0576118e0615634565b14611947576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f61646472657373206e6f7420617574686f72697a656420746f207369676e00006044820152606401610bab565b8251600090869060ff16601f811061196157611961615201565b602002015173ffffffffffffffffffffffffffffffffffffffff16146119e3576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f6e6f6e2d756e69717565207369676e61747572650000000000000000000000006044820152606401610bab565b8085846000015160ff16601f81106119fd576119fd615201565b73ffffffffffffffffffffffffffffffffffffffff909216602092909202015250611a2781615230565b905061177c565b505050611a3a8261379e565b5050505b5050505050505050565b60007f00000000000000000000000000000000000000000000000000000000000000006040517f10fc49c100000000000000000000000000000000000000000000000000000000815267ffffffffffffffff8816600482015263ffffffff8516602482015273ffffffffffffffffffffffffffffffffffffffff91909116906310fc49c19060440160006040518083038186803b158015611ae857600080fd5b505afa158015611afc573d6000803e3d6000fd5b5050505066038d7ea4c68000821115611b41576040517f8129bbcd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000611b4b610670565b90506000611b8e87878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061070692505050565b90506000611b9a612d0b565b9050611ba986868486856138ed565b9998505050505050505050565b6060600e8054611bc590614edd565b9050600003611c00576040517f4f42be3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600e805461106590614edd565b611c1561305b565b80516008805460208401516040808601516060870151608088015160a089015160c08a015161ffff167e01000000000000000000000000000000000000000000000000000000000000027dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff64ffffffffff909216790100000000000000000000000000000000000000000000000000027fffff0000000000ffffffffffffffffffffffffffffffffffffffffffffffffff68ffffffffffffffffff94851670010000000000000000000000000000000002167fffff0000000000000000000000000000ffffffffffffffffffffffffffffffff63ffffffff9687166c01000000000000000000000000027fffffffffffffffffffffffffffffffff00000000ffffffffffffffffffffffff9888166801000000000000000002989098167fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff9a8816640100000000027fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000909c169d88169d909d179a909a17989098169a909a1794909417969096169490941796909617939093169290921790925560e08401516101008501519093167c0100000000000000000000000000000000000000000000000000000000027bffffffffffffffffffffffffffffffffffffffffffffffffffffffff90931692909217600955610120830151600a805461014086015161016087015160ff1671010000000000000000000000000000000000027fffffffffffffffffffffffffffff00ffffffffffffffffffffffffffffffffff67ffffffffffffffff9092166901000000000000000000027fffffffffffffffffffffffffffffff000000000000000000000000000000000090931694909516939093171791909116919091179055517f165999a4d7499227f20106b83c79a73315af2ecd639138d441db651c5f635e8690611191908390614a02565b855185518560ff16601f831115611f5f576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f746f6f206d616e79207369676e657273000000000000000000000000000000006044820152606401610bab565b80600003611fc9576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f66206d75737420626520706f73697469766500000000000000000000000000006044820152606401610bab565b818314612057576040517f89a61989000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f6f7261636c6520616464726573736573206f7574206f6620726567697374726160448201527f74696f6e000000000000000000000000000000000000000000000000000000006064820152608401610bab565b612062816003615687565b83116120ca576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f6661756c74792d6f7261636c65206620746f6f206869676800000000000000006044820152606401610bab565b6120d2612d40565b6040805160c0810182528a8152602081018a905260ff89169181018290526060810188905267ffffffffffffffff8716608082015260a08101869052906121199088613a7b565b600554156122ce57600554600090612133906001906151d1565b905060006005828154811061214a5761214a615201565b60009182526020822001546006805473ffffffffffffffffffffffffffffffffffffffff9092169350908490811061218457612184615201565b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff85811684526004909252604080842080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000908116909155929091168084529220805490911690556005805491925090806122045761220461569e565b60008281526020902081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90810180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055019055600680548061226d5761226d61569e565b60008281526020902081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90810180547fffffffffffffffffffffffff000000000000000000000000000000000000000016905501905550612119915050565b60005b815151811015612885578151805160009190839081106122f3576122f3615201565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1603612378576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f7369676e6572206d757374206e6f7420626520656d70747900000000000000006044820152606401610bab565b600073ffffffffffffffffffffffffffffffffffffffff16826020015182815181106123a6576123a6615201565b602002602001015173ffffffffffffffffffffffffffffffffffffffff160361242b576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f7472616e736d6974746572206d757374206e6f7420626520656d7074790000006044820152606401610bab565b6000600460008460000151848151811061244757612447615201565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff16825281019190915260400160002054610100900460ff16600281111561249157612491615634565b146124f8576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f7265706561746564207369676e657220616464726573730000000000000000006044820152606401610bab565b6040805180820190915260ff8216815260016020820152825180516004916000918590811061252957612529615201565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff168252818101929092526040016000208251815460ff9091167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0082168117835592840151919283917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000016176101008360028111156125ca576125ca615634565b0217905550600091506125da9050565b60046000846020015184815181106125f4576125f4615201565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff16825281019190915260400160002054610100900460ff16600281111561263e5761263e615634565b146126a5576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f7265706561746564207472616e736d69747465722061646472657373000000006044820152606401610bab565b6040805180820190915260ff8216815260208101600281525060046000846020015184815181106126d8576126d8615201565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff168252818101929092526040016000208251815460ff9091167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0082168117835592840151919283917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000161761010083600281111561277957612779615634565b02179055505082518051600592508390811061279757612797615201565b602090810291909101810151825460018101845560009384529282902090920180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909316929092179091558201518051600691908390811061281357612813615201565b60209081029190910181015182546001810184556000938452919092200180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9092169190911790558061287d81615230565b9150506122d1565b506040810151600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660ff909216919091179055600180547fffffffff00000000ffffffffffffffffffffffffffffffffffffffffffffffff8116780100000000000000000000000000000000000000000000000063ffffffff438116820292909217808555920481169291829160149161293d918491740100000000000000000000000000000000000000009004166156cd565b92506101000a81548163ffffffff021916908363ffffffff16021790555061299c4630600160149054906101000a900463ffffffff1663ffffffff16856000015186602001518760400151886060015189608001518a60a00151613a94565b600281905582518051600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1661010060ff9093169290920291909117905560015460208501516040808701516060880151608089015160a08a015193517f1591690b8638f5fb2dbec82ac741805ac5da8b45dc5263f4875b0496fdce4e0598612a53988b9891977401000000000000000000000000000000000000000090920463ffffffff169690959194919391926156ea565b60405180910390a15050505050505050505050565b604080516101808101825260085463ffffffff80821683526401000000008204811660208401526801000000000000000082048116838501526c0100000000000000000000000080830482166060850152700100000000000000000000000000000000830468ffffffffffffffffff9081166080860152790100000000000000000000000000000000000000000000000000840464ffffffffff1660a0808701919091527e0100000000000000000000000000000000000000000000000000000000000090940461ffff1660c08601526009547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff811660e08701527c01000000000000000000000000000000000000000000000000000000009004909216610100850152600a549182166101208501526901000000000000000000820467ffffffffffffffff166101408501527101000000000000000000000000000000000090910460ff16610160840152600c5484517ffeaf968c00000000000000000000000000000000000000000000000000000000815294516000958694859490930473ffffffffffffffffffffffffffffffffffffffff169263feaf968c926004808401938290030181865afa158015612c40573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c649190615181565b509350509250508042612c7791906151d1565b836020015163ffffffff16108015612c9957506000836020015163ffffffff16115b15612cc757505060e001517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16919050565b60008213612d04576040517f43d4cf6600000000000000000000000000000000000000000000000000000000815260048101839052602401610bab565b5092915050565b600a546000906107019060649061073b9068ffffffffffffffffff16612dc3565b612d34612d40565b612d3d81613b3f565b50565b60005473ffffffffffffffffffffffffffffffffffffffff163314612dc1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401610bab565b565b6000806000612dd0610917565b9092509050612e0882612de48360126155f9565b612def90600a6158a0565b612df99087615687565b612e0391906158af565b613c34565b949350505050565b600068ffffffffffffffffff821115612eab576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203760448201527f32206269747300000000000000000000000000000000000000000000000000006064820152608401610bab565b5090565b600c546bffffffffffffffffffffffff16600003612ec957565b6000612ed3610f9f565b80519091506000819003612f13576040517f30274b3a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600c54600090612f329083906bffffffffffffffffffffffff16615117565b905060005b82811015612ffd5781600b6000868481518110612f5657612f56615201565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282829054906101000a90046bffffffffffffffffffffffff16612fbe91906158c3565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff16021790555080612ff690615230565b9050612f37565b5061300882826158e8565b600c80546000906130289084906bffffffffffffffffffffffff16615142565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550505050565b612dc1612d40565b6040805161018081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810182905261012081018290526101408101829052610160810191909152604080516101808101825260085463ffffffff80821683526401000000008204811660208401526801000000000000000082048116938301939093526c0100000000000000000000000081048316606083015268ffffffffffffffffff70010000000000000000000000000000000082048116608084015264ffffffffff79010000000000000000000000000000000000000000000000000083041660a084015261ffff7e01000000000000000000000000000000000000000000000000000000000000909204821660c084018190526009547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff811660e08601527c0100000000000000000000000000000000000000000000000000000000900490941661010080850191909152600a5491821661012085015267ffffffffffffffff690100000000000000000083041661014085015260ff7101000000000000000000000000000000000090920491909116610160840152850151919291161115613272576040517fdada758700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006132818460000151610706565b9050600061328d612d0b565b905060006132a68660e001513a858960800151866138ed565b9050806bffffffffffffffffffffffff1686606001516bffffffffffffffffffffffff161015613302576040517ff4d678b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600084610100015163ffffffff164261331b9190615910565b905060003088604001518960a001518a60c00151600161333b9190615923565b8b5180516020918201206101008e015160e08f01516040516133ef98979695948c918c9132910173ffffffffffffffffffffffffffffffffffffffff9a8b168152988a1660208a015267ffffffffffffffff97881660408a0152959096166060880152608087019390935261ffff9190911660a086015263ffffffff90811660c08601526bffffffffffffffffffffffff9190911660e0850152919091166101008301529091166101208201526101400190565b6040516020818303038152906040528051906020012090506040518061018001604052808281526020013073ffffffffffffffffffffffffffffffffffffffff168152602001846bffffffffffffffffffffffff168152602001896040015173ffffffffffffffffffffffffffffffffffffffff1681526020018960a0015167ffffffffffffffff1681526020018960e0015163ffffffff168152602001896080015168ffffffffffffffffff1681526020018668ffffffffffffffffff168152602001876040015163ffffffff1664ffffffffff168152602001876060015163ffffffff1664ffffffffff1681526020018363ffffffff1681526020018568ffffffffffffffffff1681525096508660405160200161350f9190615944565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291815281516020928301206000938452600790925290912055509395945050505050565b60006135926040518060a0016040528060608152602001606081526020016060815260200160608152602001606081525090565b6000808080806135a4888a018a615a2e565b84519499509297509095509350915060ff168015806135c4575084518114155b806135d0575083518114155b806135dc575082518114155b806135e8575081518114155b1561364f576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f4669656c6473206d75737420626520657175616c206c656e67746800000000006044820152606401610bab565b60005b818110156136b55761368b87828151811061366f5761366f615201565b6020026020010151600090815260076020526040902054151590565b6136b55761369a6001836151d1565b81036136a557600198505b6136ae81615230565b9050613652565b50506040805160a0810182529586526020860194909452928401919091526060830152608082015290505b9250929050565b60006136f4826020615687565b6136ff856020615687565b61370b88610144615910565b6137159190615910565b61371f9190615910565b61372a906000615910565b9050368114613795576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f63616c6c64617461206c656e677468206d69736d6174636800000000000000006044820152606401610bab565b50505050505050565b80515160ff1660005b8181101561066b576000613850846000015183815181106137ca576137ca615201565b6020026020010151856020015184815181106137e8576137e8615201565b60200260200101518660400151858151811061380657613806615201565b60200260200101518760600151868151811061382457613824615201565b60200260200101518860800151878151811061384257613842615201565b602002602001015188613cd2565b9050600081600681111561386657613866615634565b14806138835750600181600681111561388157613881615634565b145b156138dc57835180518390811061389c5761389c615201565b60209081029190910181015160405133815290917fc708e0440951fd63499c0f7a73819b469ee5dd3ecc356c0ab4eb7f18389009d9910160405180910390a25b506138e681615230565b90506137a7565b600854600090790100000000000000000000000000000000000000000000000000900464ffffffffff1685101561394857600854790100000000000000000000000000000000000000000000000000900464ffffffffff1694505b600854600090612710906139629063ffffffff1688615687565b61396c91906158af565b6139769087615910565b60085490915060009088906139af9063ffffffff6c010000000000000000000000008204811691680100000000000000009004166156cd565b6139b991906156cd565b63ffffffff1690506000613a036000368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061419f92505050565b90506000613a2482613a158587615687565b613a1f9190615910565b6142e1565b905060008668ffffffffffffffffff168868ffffffffffffffffff168a68ffffffffffffffffff16613a5691906158c3565b613a6091906158c3565b9050613a6c81836158c3565b9b9a5050505050505050505050565b6000613a85610f9f565b511115610f4b57610f4b612eaf565b6000808a8a8a8a8a8a8a8a8a604051602001613ab899989796959493929190615b00565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291905280516020909101207dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e01000000000000000000000000000000000000000000000000000000000000179150509998505050505050505050565b3373ffffffffffffffffffffffffffffffffffffffff821603613bbe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401610bab565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b60006bffffffffffffffffffffffff821115612eab576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203960448201527f36206269747300000000000000000000000000000000000000000000000000006064820152608401610bab565b60008084806020019051810190613ce99190615bcc565b905060003a826101200151836101000151613d049190615ca6565b64ffffffffff16613d159190615687565b905060008460ff16613d5d6000368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061419f92505050565b613d6791906158af565b90506000613d78613a1f8385615910565b90506000613d853a6142e1565b90506000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663330605298e8e868b610160015168ffffffffffffffffff168c60e0015168ffffffffffffffffff168a613df591906158c3565b613dff91906158c3565b336040518061016001604052808f6000015181526020018f6020015173ffffffffffffffffffffffffffffffffffffffff1681526020018f604001516bffffffffffffffffffffffff1681526020018f6060015173ffffffffffffffffffffffffffffffffffffffff1681526020018f6080015167ffffffffffffffff1681526020018f60a0015163ffffffff1681526020018f60c0015168ffffffffffffffffff1681526020018f60e0015168ffffffffffffffffff1681526020018f610100015164ffffffffff1681526020018f610120015164ffffffffff1681526020018f610140015163ffffffff168152506040518763ffffffff1660e01b8152600401613f1096959493929190615cc4565b60408051808303816000875af1158015613f2e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613f529190615d40565b90925090506000826006811115613f6b57613f6b615634565b1480613f8857506001826006811115613f8657613f86615634565b145b1561418e5760008e815260076020526040812055613fa681856158c3565b336000908152600b602052604081208054909190613fd39084906bffffffffffffffffffffffff166158c3565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055508660e0015168ffffffffffffffffff16600c60008282829054906101000a90046bffffffffffffffffffffffff1661403991906158c3565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff16021790555086610160015168ffffffffffffffffff16600b6000614084614300565b73ffffffffffffffffffffffffffffffffffffffff1681526020810191909152604001600090812080549091906140ca9084906bffffffffffffffffffffffff166158c3565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055508d7f08a4a0761e3c98d288cb4af9342660f49550d83139fb3b762b70d34bed6273688487848b60e001518c60c001518d6101600151604051614185969594939291906bffffffffffffffffffffffff9687168152602081019590955292909416604084015268ffffffffffffffffff9081166060840152928316608083015290911660a082015260c00190565b60405180910390a25b509c9b505050505050505050505050565b6000466141ab81614371565b1561422757606c73ffffffffffffffffffffffffffffffffffffffff1663c6f7de0e6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156141fc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906142209190615d73565b9392505050565b61423081614394565b156142d85773420000000000000000000000000000000000000f73ffffffffffffffffffffffffffffffffffffffff166349948e0e84604051806080016040528060488152602001615dd960489139604051602001614290929190615d8c565b6040516020818303038152906040526040518263ffffffff1660e01b81526004016142bb91906144ec565b602060405180830381865afa1580156141fc573d6000803e3d6000fd5b50600092915050565b60006107586142ee612a68565b612df984670de0b6b3a7640000615687565b60003073ffffffffffffffffffffffffffffffffffffffff16638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561434d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107019190615dbb565b600061a4b1821480614385575062066eed82145b8061075857505062066eee1490565b6000600a8214806143a657506101a482145b806143b3575062aa37dc82145b806143bf575061210582145b806143cc575062014a3382145b8061075857505062014a341490565b604051806103e00160405280601f906020820280368337509192915050565b60008083601f84011261440c57600080fd5b50813567ffffffffffffffff81111561442457600080fd5b6020830191508360208285010111156136e057600080fd5b6000806020838503121561444f57600080fd5b823567ffffffffffffffff81111561446657600080fd5b614472858286016143fa565b90969095509350505050565b60005b83811015614499578181015183820152602001614481565b50506000910152565b600081518084526144ba81602086016020860161447e565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60208152600061422060208301846144a2565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051610180810167ffffffffffffffff81118282101715614552576145526144ff565b60405290565b604051610160810167ffffffffffffffff81118282101715614552576145526144ff565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156145c3576145c36144ff565b604052919050565b600082601f8301126145dc57600080fd5b813567ffffffffffffffff8111156145f6576145f66144ff565b61462760207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8401160161457c565b81815284602083860101111561463c57600080fd5b816020850160208301376000918101602001919091529392505050565b60006020828403121561466b57600080fd5b813567ffffffffffffffff81111561468257600080fd5b612e08848285016145cb565b73ffffffffffffffffffffffffffffffffffffffff81168114612d3d57600080fd5b803561142c8161468e565b6bffffffffffffffffffffffff81168114612d3d57600080fd5b803561142c816146bb565b600080604083850312156146f357600080fd5b82356146fe8161468e565b9150602083013561470e816146bb565b809150509250929050565b600081518084526020808501945080840160005b8381101561475f57815173ffffffffffffffffffffffffffffffffffffffff168752958201959082019060010161472d565b509495945050505050565b6020815260006142206020830184614719565b60006020828403121561478f57600080fd5b5035919050565b6000602082840312156147a857600080fd5b813567ffffffffffffffff8111156147bf57600080fd5b8201610160818503121561422057600080fd5b8051825260208101516147fd602084018273ffffffffffffffffffffffffffffffffffffffff169052565b50604081015161481d60408401826bffffffffffffffffffffffff169052565b506060810151614845606084018273ffffffffffffffffffffffffffffffffffffffff169052565b506080810151614861608084018267ffffffffffffffff169052565b5060a081015161487960a084018263ffffffff169052565b5060c081015161489660c084018268ffffffffffffffffff169052565b5060e08101516148b360e084018268ffffffffffffffffff169052565b506101008181015164ffffffffff81168483015250506101208181015164ffffffffff81168483015250506101408181015163ffffffff8116848301525b50505050565b610160810161075882846147d2565b60008083601f84011261491857600080fd5b50813567ffffffffffffffff81111561493057600080fd5b6020830191508360208260051b85010111156136e057600080fd5b60008060008060008060008060e0898b03121561496757600080fd5b606089018a81111561497857600080fd5b8998503567ffffffffffffffff8082111561499257600080fd5b61499e8c838d016143fa565b909950975060808b01359150808211156149b757600080fd5b6149c38c838d01614906565b909750955060a08b01359150808211156149dc57600080fd5b506149e98b828c01614906565b999c989b50969995989497949560c00135949350505050565b815163ffffffff16815261018081016020830151614a28602084018263ffffffff169052565b506040830151614a40604084018263ffffffff169052565b506060830151614a58606084018263ffffffff169052565b506080830151614a75608084018268ffffffffffffffffff169052565b5060a0830151614a8e60a084018264ffffffffff169052565b5060c0830151614aa460c084018261ffff169052565b5060e0830151614ad460e08401827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff169052565b506101008381015163ffffffff16908301526101208084015168ffffffffffffffffff16908301526101408084015167ffffffffffffffff16908301526101608084015160ff8116828501525b505092915050565b67ffffffffffffffff81168114612d3d57600080fd5b803561142c81614b29565b63ffffffff81168114612d3d57600080fd5b803561142c81614b4a565b600080600080600060808688031215614b7f57600080fd5b8535614b8a81614b29565b9450602086013567ffffffffffffffff811115614ba657600080fd5b614bb2888289016143fa565b9095509350506040860135614bc681614b4a565b949793965091946060013592915050565b68ffffffffffffffffff81168114612d3d57600080fd5b803561142c81614bd7565b64ffffffffff81168114612d3d57600080fd5b803561142c81614bf9565b803561ffff8116811461142c57600080fd5b80357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8116811461142c57600080fd5b60ff81168114612d3d57600080fd5b803561142c81614c55565b60006101808284031215614c8257600080fd5b614c8a61452e565b614c9383614b5c565b8152614ca160208401614b5c565b6020820152614cb260408401614b5c565b6040820152614cc360608401614b5c565b6060820152614cd460808401614bee565b6080820152614ce560a08401614c0c565b60a0820152614cf660c08401614c17565b60c0820152614d0760e08401614c29565b60e0820152610100614d1a818501614b5c565b90820152610120614d2c848201614bee565b90820152610140614d3e848201614b3f565b90820152610160614d50848201614c64565b908201529392505050565b600067ffffffffffffffff821115614d7557614d756144ff565b5060051b60200190565b600082601f830112614d9057600080fd5b81356020614da5614da083614d5b565b61457c565b82815260059290921b84018101918181019086841115614dc457600080fd5b8286015b84811015614de8578035614ddb8161468e565b8352918301918301614dc8565b509695505050505050565b60008060008060008060c08789031215614e0c57600080fd5b863567ffffffffffffffff80821115614e2457600080fd5b614e308a838b01614d7f565b97506020890135915080821115614e4657600080fd5b614e528a838b01614d7f565b9650614e6060408a01614c64565b95506060890135915080821115614e7657600080fd5b614e828a838b016145cb565b9450614e9060808a01614b3f565b935060a0890135915080821115614ea657600080fd5b50614eb389828a016145cb565b9150509295509295509295565b600060208284031215614ed257600080fd5b81356142208161468e565b600181811c90821680614ef157607f821691505b602082108103614f2a577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b601f82111561066b57600081815260208120601f850160051c81016020861015614f575750805b601f850160051c820191505b8181101561090f57828155600101614f63565b67ffffffffffffffff831115614f8e57614f8e6144ff565b614fa283614f9c8354614edd565b83614f30565b6000601f841160018114614ff45760008515614fbe5750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b17835561508a565b6000838152602090207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0861690835b828110156150435786850135825560209485019460019092019101615023565b508682101561507e577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b805161142c81614bd7565b6000602082840312156150ae57600080fd5b815161422081614bd7565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006bffffffffffffffffffffffff80841680615136576151366150b9565b92169190910492915050565b6bffffffffffffffffffffffff828116828216039080821115612d0457612d046150e8565b805169ffffffffffffffffffff8116811461142c57600080fd5b600080600080600060a0868803121561519957600080fd5b6151a286615167565b94506020860151935060408601519250606086015191506151c560808701615167565b90509295509295909350565b81810381811115610758576107586150e8565b6000602082840312156151f657600080fd5b815161422081614c55565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203615261576152616150e8565b5060010190565b6000610160823603121561527b57600080fd5b615283614558565b823567ffffffffffffffff81111561529a57600080fd5b6152a6368286016145cb565b825250602083013560208201526152bf604084016146b0565b60408201526152d0606084016146d5565b60608201526152e160808401614bee565b60808201526152f260a08401614b3f565b60a082015261530360c08401614b3f565b60c082015261531460e08401614b5c565b60e0820152610100615327818501614c17565b90820152610120615339848201614b3f565b9082015261014061534b8482016146b0565b9082015292915050565b60006020828403121561536757600080fd5b813561422081614b29565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18436030181126153a757600080fd5b83018035915067ffffffffffffffff8211156153c257600080fd5b6020019150368190038213156136e057600080fd5b6000602082840312156153e957600080fd5b61422082614c17565b60006020828403121561540457600080fd5b813561422081614b4a565b80518252602081015161543a602084018273ffffffffffffffffffffffffffffffffffffffff169052565b50604081015161545a60408401826bffffffffffffffffffffffff169052565b506060810151615482606084018273ffffffffffffffffffffffffffffffffffffffff169052565b50608081015161549e608084018267ffffffffffffffff169052565b5060a08101516154b660a084018263ffffffff169052565b5060c08101516154d360c084018268ffffffffffffffffff169052565b5060e08101516154f060e084018268ffffffffffffffffff169052565b506101008181015164ffffffffff9081169184019190915261012080830151909116908301526101408082015163ffffffff16908301526101608082015168ffffffffffffffffff8116828501526148f1565b73ffffffffffffffffffffffffffffffffffffffff8a8116825267ffffffffffffffff8a166020830152881660408201526102606060820181905281018690526000610280878982850137600083890182015261ffff8716608084015260a0830186905263ffffffff851660c0840152601f88017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01683010190506155eb60e083018461540f565b9a9950505050505050505050565b60ff8181168382160190811115610758576107586150e8565b600060ff831680615625576156256150b9565b8060ff84160491505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b8183823760009101908152919050565b828152606082602083013760800192915050565b8082028115828204841417610758576107586150e8565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b63ffffffff818116838216019080821115612d0457612d046150e8565b600061012063ffffffff808d1684528b6020850152808b1660408501525080606084015261571a8184018a614719565b9050828103608084015261572e8189614719565b905060ff871660a084015282810360c084015261574b81876144a2565b905067ffffffffffffffff851660e084015282810361010084015261577081856144a2565b9c9b505050505050505050505050565b600181815b808511156157d957817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048211156157bf576157bf6150e8565b808516156157cc57918102915b93841c9390800290615785565b509250929050565b6000826157f057506001610758565b816157fd57506000610758565b8160018114615813576002811461581d57615839565b6001915050610758565b60ff84111561582e5761582e6150e8565b50506001821b610758565b5060208310610133831016604e8410600b841016171561585c575081810a610758565b6158668383615780565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115615898576158986150e8565b029392505050565b600061422060ff8416836157e1565b6000826158be576158be6150b9565b500490565b6bffffffffffffffffffffffff818116838216019080821115612d0457612d046150e8565b6bffffffffffffffffffffffff818116838216028082169190828114614b2157614b216150e8565b80820180821115610758576107586150e8565b67ffffffffffffffff818116838216019080821115612d0457612d046150e8565b6101808101610758828461540f565b600082601f83011261596457600080fd5b81356020615974614da083614d5b565b82815260059290921b8401810191818101908684111561599357600080fd5b8286015b84811015614de85780358352918301918301615997565b600082601f8301126159bf57600080fd5b813560206159cf614da083614d5b565b82815260059290921b840181019181810190868411156159ee57600080fd5b8286015b84811015614de857803567ffffffffffffffff811115615a125760008081fd5b615a208986838b01016145cb565b8452509183019183016159f2565b600080600080600060a08688031215615a4657600080fd5b853567ffffffffffffffff80821115615a5e57600080fd5b615a6a89838a01615953565b96506020880135915080821115615a8057600080fd5b615a8c89838a016159ae565b95506040880135915080821115615aa257600080fd5b615aae89838a016159ae565b94506060880135915080821115615ac457600080fd5b615ad089838a016159ae565b93506080880135915080821115615ae657600080fd5b50615af3888289016159ae565b9150509295509295909350565b60006101208b835273ffffffffffffffffffffffffffffffffffffffff8b16602084015267ffffffffffffffff808b166040850152816060850152615b478285018b614719565b91508382036080850152615b5b828a614719565b915060ff881660a085015283820360c0850152615b7882886144a2565b90861660e0850152838103610100850152905061577081856144a2565b805161142c8161468e565b805161142c816146bb565b805161142c81614b29565b805161142c81614b4a565b805161142c81614bf9565b60006101808284031215615bdf57600080fd5b615be761452e565b82518152615bf760208401615b95565b6020820152615c0860408401615ba0565b6040820152615c1960608401615b95565b6060820152615c2a60808401615bab565b6080820152615c3b60a08401615bb6565b60a0820152615c4c60c08401615091565b60c0820152615c5d60e08401615091565b60e0820152610100615c70818501615bc1565b90820152610120615c82848201615bc1565b90820152610140615c94848201615bb6565b90820152610160614d50848201615091565b64ffffffffff818116838216019080821115612d0457612d046150e8565b6000610200808352615cd88184018a6144a2565b90508281036020840152615cec81896144a2565b6bffffffffffffffffffffffff88811660408601528716606085015273ffffffffffffffffffffffffffffffffffffffff861660808501529150615d35905060a08301846147d2565b979650505050505050565b60008060408385031215615d5357600080fd5b825160078110615d6257600080fd5b602084015190925061470e816146bb565b600060208284031215615d8557600080fd5b5051919050565b60008351615d9e81846020880161447e565b835190830190615db281836020880161447e565b01949350505050565b600060208284031215615dcd57600080fd5b81516142208161468e56fe307866666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666a164736f6c6343000813000a", } var FunctionsCoordinatorABI = FunctionsCoordinatorMetaData.ABI var FunctionsCoordinatorBin = FunctionsCoordinatorMetaData.Bin -func DeployFunctionsCoordinator(auth *bind.TransactOpts, backend bind.ContractBackend, router common.Address, config FunctionsBillingConfig, linkToNativeFeed common.Address) (common.Address, *types.Transaction, *FunctionsCoordinator, error) { +func DeployFunctionsCoordinator(auth *bind.TransactOpts, backend bind.ContractBackend, router common.Address, config FunctionsBillingConfig, linkToNativeFeed common.Address, linkToUsdFeed common.Address) (common.Address, *types.Transaction, *FunctionsCoordinator, error) { parsed, err := FunctionsCoordinatorMetaData.GetAbi() if err != nil { return common.Address{}, nil, nil, err @@ -88,7 +106,7 @@ func DeployFunctionsCoordinator(auth *bind.TransactOpts, backend bind.ContractBa return common.Address{}, nil, nil, errors.New("GetABI returned nil") } - address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(FunctionsCoordinatorBin), backend, router, config, linkToNativeFeed) + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(FunctionsCoordinatorBin), backend, router, config, linkToNativeFeed, linkToUsdFeed) if err != nil { return common.Address{}, nil, nil, err } @@ -321,6 +339,28 @@ func (_FunctionsCoordinator *FunctionsCoordinatorCallerSession) GetDONPublicKey( return _FunctionsCoordinator.Contract.GetDONPublicKey(&_FunctionsCoordinator.CallOpts) } +func (_FunctionsCoordinator *FunctionsCoordinatorCaller) GetOperationFee(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _FunctionsCoordinator.contract.Call(opts, &out, "getOperationFee") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +func (_FunctionsCoordinator *FunctionsCoordinatorSession) GetOperationFee() (*big.Int, error) { + return _FunctionsCoordinator.Contract.GetOperationFee(&_FunctionsCoordinator.CallOpts) +} + +func (_FunctionsCoordinator *FunctionsCoordinatorCallerSession) GetOperationFee() (*big.Int, error) { + return _FunctionsCoordinator.Contract.GetOperationFee(&_FunctionsCoordinator.CallOpts) +} + func (_FunctionsCoordinator *FunctionsCoordinatorCaller) GetThresholdPublicKey(opts *bind.CallOpts) ([]byte, error) { var out []interface{} err := _FunctionsCoordinator.contract.Call(opts, &out, "getThresholdPublicKey") @@ -343,6 +383,29 @@ func (_FunctionsCoordinator *FunctionsCoordinatorCallerSession) GetThresholdPubl return _FunctionsCoordinator.Contract.GetThresholdPublicKey(&_FunctionsCoordinator.CallOpts) } +func (_FunctionsCoordinator *FunctionsCoordinatorCaller) GetUsdPerUnitLink(opts *bind.CallOpts) (*big.Int, uint8, error) { + var out []interface{} + err := _FunctionsCoordinator.contract.Call(opts, &out, "getUsdPerUnitLink") + + if err != nil { + return *new(*big.Int), *new(uint8), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + out1 := *abi.ConvertType(out[1], new(uint8)).(*uint8) + + return out0, out1, err + +} + +func (_FunctionsCoordinator *FunctionsCoordinatorSession) GetUsdPerUnitLink() (*big.Int, uint8, error) { + return _FunctionsCoordinator.Contract.GetUsdPerUnitLink(&_FunctionsCoordinator.CallOpts) +} + +func (_FunctionsCoordinator *FunctionsCoordinatorCallerSession) GetUsdPerUnitLink() (*big.Int, uint8, error) { + return _FunctionsCoordinator.Contract.GetUsdPerUnitLink(&_FunctionsCoordinator.CallOpts) +} + func (_FunctionsCoordinator *FunctionsCoordinatorCaller) GetWeiPerUnitLink(opts *bind.CallOpts) (*big.Int, error) { var out []interface{} err := _FunctionsCoordinator.contract.Call(opts, &out, "getWeiPerUnitLink") @@ -1054,7 +1117,7 @@ type FunctionsCoordinatorOracleRequest struct { DataVersion uint16 Flags [32]byte CallbackGasLimit uint64 - Commitment FunctionsResponseCommitment + Commitment FunctionsResponseCommitmentWithOperationFee Raw types.Log } @@ -1593,7 +1656,9 @@ type FunctionsCoordinatorRequestBilled struct { JuelsPerGas *big.Int L1FeeShareWei *big.Int CallbackCostJuels *big.Int - TotalCostJuels *big.Int + DonFee *big.Int + AdminFee *big.Int + OperationFee *big.Int Raw types.Log } @@ -1823,11 +1888,11 @@ func (FunctionsCoordinatorConfigSet) Topic() common.Hash { } func (FunctionsCoordinatorConfigUpdated) Topic() common.Hash { - return common.HexToHash("0x5f32d06f5e83eda3a68e0e964ef2e6af5cb613e8117aa103c2d6bca5f5184862") + return common.HexToHash("0x165999a4d7499227f20106b83c79a73315af2ecd639138d441db651c5f635e86") } func (FunctionsCoordinatorOracleRequest) Topic() common.Hash { - return common.HexToHash("0xbf50768ccf13bd0110ca6d53a9c4f1f3271abdd4c24a56878863ed25b20598ff") + return common.HexToHash("0x718684b6c135c1277575a7b5c7365bc9587d5ebfd899230d5fa11360f6143bfb") } func (FunctionsCoordinatorOracleResponse) Topic() common.Hash { @@ -1843,7 +1908,7 @@ func (FunctionsCoordinatorOwnershipTransferred) Topic() common.Hash { } func (FunctionsCoordinatorRequestBilled) Topic() common.Hash { - return common.HexToHash("0x90815c2e624694e8010bffad2bcefaf96af282ef1bc2ebc0042d1b89a585e046") + return common.HexToHash("0x08a4a0761e3c98d288cb4af9342660f49550d83139fb3b762b70d34bed627368") } func (FunctionsCoordinatorTransmitted) Topic() common.Hash { @@ -1865,8 +1930,12 @@ type FunctionsCoordinatorInterface interface { GetDONPublicKey(opts *bind.CallOpts) ([]byte, error) + GetOperationFee(opts *bind.CallOpts) (*big.Int, error) + GetThresholdPublicKey(opts *bind.CallOpts) ([]byte, error) + GetUsdPerUnitLink(opts *bind.CallOpts) (*big.Int, uint8, error) + GetWeiPerUnitLink(opts *bind.CallOpts) (*big.Int, error) LatestConfigDetails(opts *bind.CallOpts) (LatestConfigDetails, diff --git a/core/gethwrappers/functions/generated/functions_coordinator_1_1_0/functions_coordinator_1_1_0.go b/core/gethwrappers/functions/generated/functions_coordinator_1_1_0/functions_coordinator_1_1_0.go new file mode 100644 index 00000000000..32e66090c7d --- /dev/null +++ b/core/gethwrappers/functions/generated/functions_coordinator_1_1_0/functions_coordinator_1_1_0.go @@ -0,0 +1,1965 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package functions_coordinator_1_1_0 + +import ( + "errors" + "fmt" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated" +) + +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +type FunctionsBillingConfig struct { + FulfillmentGasPriceOverEstimationBP uint32 + FeedStalenessSeconds uint32 + GasOverheadBeforeCallback uint32 + GasOverheadAfterCallback uint32 + DonFee *big.Int + MinimumEstimateGasPriceWei *big.Int + MaxSupportedRequestDataVersion uint16 + FallbackNativePerUnitLink *big.Int + RequestTimeoutSeconds uint32 +} + +type FunctionsResponseCommitment struct { + RequestId [32]byte + Coordinator common.Address + EstimatedTotalCostJuels *big.Int + Client common.Address + SubscriptionId uint64 + CallbackGasLimit uint32 + AdminFee *big.Int + DonFee *big.Int + GasOverheadBeforeCallback *big.Int + GasOverheadAfterCallback *big.Int + TimeoutTimestamp uint32 +} + +type FunctionsResponseRequestMeta struct { + Data []byte + Flags [32]byte + RequestingContract common.Address + AvailableBalance *big.Int + AdminFee *big.Int + SubscriptionId uint64 + InitiatedRequests uint64 + CallbackGasLimit uint32 + DataVersion uint16 + CompletedRequests uint64 + SubscriptionOwner common.Address +} + +var FunctionsCoordinator110MetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"fulfillmentGasPriceOverEstimationBP\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"feedStalenessSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasOverheadBeforeCallback\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasOverheadAfterCallback\",\"type\":\"uint32\"},{\"internalType\":\"uint72\",\"name\":\"donFee\",\"type\":\"uint72\"},{\"internalType\":\"uint40\",\"name\":\"minimumEstimateGasPriceWei\",\"type\":\"uint40\"},{\"internalType\":\"uint16\",\"name\":\"maxSupportedRequestDataVersion\",\"type\":\"uint16\"},{\"internalType\":\"uint224\",\"name\":\"fallbackNativePerUnitLink\",\"type\":\"uint224\"},{\"internalType\":\"uint32\",\"name\":\"requestTimeoutSeconds\",\"type\":\"uint32\"}],\"internalType\":\"structFunctionsBilling.Config\",\"name\":\"config\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"linkToNativeFeed\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"EmptyPublicKey\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InconsistentReportData\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientBalance\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidCalldata\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"message\",\"type\":\"string\"}],\"name\":\"InvalidConfig\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"int256\",\"name\":\"linkWei\",\"type\":\"int256\"}],\"name\":\"InvalidLinkWeiPrice\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidSubscription\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"MustBeSubOwner\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NoTransmittersSet\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByRouter\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByRouterOwner\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PaymentTooLarge\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"message\",\"type\":\"string\"}],\"name\":\"ReportInvalid\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RouterMustBeSet\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnauthorizedPublicKeyChange\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnauthorizedSender\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnsupportedRequestDataVersion\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"requestId\",\"type\":\"bytes32\"}],\"name\":\"CommitmentDeleted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"previousConfigBlockNumber\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"configCount\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"signers\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"transmitters\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"onchainConfig\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"offchainConfigVersion\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"}],\"name\":\"ConfigSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"fulfillmentGasPriceOverEstimationBP\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"feedStalenessSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasOverheadBeforeCallback\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasOverheadAfterCallback\",\"type\":\"uint32\"},{\"internalType\":\"uint72\",\"name\":\"donFee\",\"type\":\"uint72\"},{\"internalType\":\"uint40\",\"name\":\"minimumEstimateGasPriceWei\",\"type\":\"uint40\"},{\"internalType\":\"uint16\",\"name\":\"maxSupportedRequestDataVersion\",\"type\":\"uint16\"},{\"internalType\":\"uint224\",\"name\":\"fallbackNativePerUnitLink\",\"type\":\"uint224\"},{\"internalType\":\"uint32\",\"name\":\"requestTimeoutSeconds\",\"type\":\"uint32\"}],\"indexed\":false,\"internalType\":\"structFunctionsBilling.Config\",\"name\":\"config\",\"type\":\"tuple\"}],\"name\":\"ConfigUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"requestId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"requestingContract\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"requestInitiator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"subscriptionId\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"subscriptionOwner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"dataVersion\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"flags\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"callbackGasLimit\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"requestId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"coordinator\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"estimatedTotalCostJuels\",\"type\":\"uint96\"},{\"internalType\":\"address\",\"name\":\"client\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"subscriptionId\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint72\",\"name\":\"adminFee\",\"type\":\"uint72\"},{\"internalType\":\"uint72\",\"name\":\"donFee\",\"type\":\"uint72\"},{\"internalType\":\"uint40\",\"name\":\"gasOverheadBeforeCallback\",\"type\":\"uint40\"},{\"internalType\":\"uint40\",\"name\":\"gasOverheadAfterCallback\",\"type\":\"uint40\"},{\"internalType\":\"uint32\",\"name\":\"timeoutTimestamp\",\"type\":\"uint32\"}],\"indexed\":false,\"internalType\":\"structFunctionsResponse.Commitment\",\"name\":\"commitment\",\"type\":\"tuple\"}],\"name\":\"OracleRequest\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"requestId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"transmitter\",\"type\":\"address\"}],\"name\":\"OracleResponse\",\"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\":\"bytes32\",\"name\":\"requestId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"juelsPerGas\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"l1FeeShareWei\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"callbackCostJuels\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"totalCostJuels\",\"type\":\"uint96\"}],\"name\":\"RequestBilled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"epoch\",\"type\":\"uint32\"}],\"name\":\"Transmitted\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"requestId\",\"type\":\"bytes32\"}],\"name\":\"deleteCommitment\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"subscriptionId\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"gasPriceWei\",\"type\":\"uint256\"}],\"name\":\"estimateCost\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAdminFee\",\"outputs\":[{\"internalType\":\"uint72\",\"name\":\"\",\"type\":\"uint72\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getConfig\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"fulfillmentGasPriceOverEstimationBP\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"feedStalenessSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasOverheadBeforeCallback\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasOverheadAfterCallback\",\"type\":\"uint32\"},{\"internalType\":\"uint72\",\"name\":\"donFee\",\"type\":\"uint72\"},{\"internalType\":\"uint40\",\"name\":\"minimumEstimateGasPriceWei\",\"type\":\"uint40\"},{\"internalType\":\"uint16\",\"name\":\"maxSupportedRequestDataVersion\",\"type\":\"uint16\"},{\"internalType\":\"uint224\",\"name\":\"fallbackNativePerUnitLink\",\"type\":\"uint224\"},{\"internalType\":\"uint32\",\"name\":\"requestTimeoutSeconds\",\"type\":\"uint32\"}],\"internalType\":\"structFunctionsBilling.Config\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"getDONFee\",\"outputs\":[{\"internalType\":\"uint72\",\"name\":\"\",\"type\":\"uint72\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getDONPublicKey\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getThresholdPublicKey\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getWeiPerUnitLink\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestConfigDetails\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"configCount\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blockNumber\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestConfigDigestAndEpoch\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"scanLogs\",\"type\":\"bool\"},{\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"epoch\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"oracleWithdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"oracleWithdrawAll\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_signers\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"_transmitters\",\"type\":\"address[]\"},{\"internalType\":\"uint8\",\"name\":\"_f\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"_onchainConfig\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"_offchainConfigVersion\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"_offchainConfig\",\"type\":\"bytes\"}],\"name\":\"setConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"donPublicKey\",\"type\":\"bytes\"}],\"name\":\"setDONPublicKey\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"thresholdPublicKey\",\"type\":\"bytes\"}],\"name\":\"setThresholdPublicKey\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"flags\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"requestingContract\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"availableBalance\",\"type\":\"uint96\"},{\"internalType\":\"uint72\",\"name\":\"adminFee\",\"type\":\"uint72\"},{\"internalType\":\"uint64\",\"name\":\"subscriptionId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"initiatedRequests\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"dataVersion\",\"type\":\"uint16\"},{\"internalType\":\"uint64\",\"name\":\"completedRequests\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"subscriptionOwner\",\"type\":\"address\"}],\"internalType\":\"structFunctionsResponse.RequestMeta\",\"name\":\"request\",\"type\":\"tuple\"}],\"name\":\"startRequest\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"requestId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"coordinator\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"estimatedTotalCostJuels\",\"type\":\"uint96\"},{\"internalType\":\"address\",\"name\":\"client\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"subscriptionId\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint72\",\"name\":\"adminFee\",\"type\":\"uint72\"},{\"internalType\":\"uint72\",\"name\":\"donFee\",\"type\":\"uint72\"},{\"internalType\":\"uint40\",\"name\":\"gasOverheadBeforeCallback\",\"type\":\"uint40\"},{\"internalType\":\"uint40\",\"name\":\"gasOverheadAfterCallback\",\"type\":\"uint40\"},{\"internalType\":\"uint32\",\"name\":\"timeoutTimestamp\",\"type\":\"uint32\"}],\"internalType\":\"structFunctionsResponse.Commitment\",\"name\":\"commitment\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[3]\",\"name\":\"reportContext\",\"type\":\"bytes32[3]\"},{\"internalType\":\"bytes\",\"name\":\"report\",\"type\":\"bytes\"},{\"internalType\":\"bytes32[]\",\"name\":\"rs\",\"type\":\"bytes32[]\"},{\"internalType\":\"bytes32[]\",\"name\":\"ss\",\"type\":\"bytes32[]\"},{\"internalType\":\"bytes32\",\"name\":\"rawVs\",\"type\":\"bytes32\"}],\"name\":\"transmit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"transmitters\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"typeAndVersion\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"fulfillmentGasPriceOverEstimationBP\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"feedStalenessSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasOverheadBeforeCallback\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasOverheadAfterCallback\",\"type\":\"uint32\"},{\"internalType\":\"uint72\",\"name\":\"donFee\",\"type\":\"uint72\"},{\"internalType\":\"uint40\",\"name\":\"minimumEstimateGasPriceWei\",\"type\":\"uint40\"},{\"internalType\":\"uint16\",\"name\":\"maxSupportedRequestDataVersion\",\"type\":\"uint16\"},{\"internalType\":\"uint224\",\"name\":\"fallbackNativePerUnitLink\",\"type\":\"uint224\"},{\"internalType\":\"uint32\",\"name\":\"requestTimeoutSeconds\",\"type\":\"uint32\"}],\"internalType\":\"structFunctionsBilling.Config\",\"name\":\"config\",\"type\":\"tuple\"}],\"name\":\"updateConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x60a06040523480156200001157600080fd5b50604051620056f7380380620056f783398101604081905262000034916200046d565b8282828233806000816200008f5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000c257620000c28162000139565b5050506001600160a01b038116620000ed57604051632530e88560e11b815260040160405180910390fd5b6001600160a01b03908116608052600b80549183166c01000000000000000000000000026001600160601b039092169190911790556200012d82620001e4565b5050505050506200062c565b336001600160a01b03821603620001935760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000086565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b620001ee62000342565b80516008805460208401516040808601516060870151608088015160a089015160c08a015161ffff16600160f01b026001600160f01b0364ffffffffff909216600160c81b0264ffffffffff60c81b196001600160481b03909416600160801b0293909316600160801b600160f01b031963ffffffff9586166c010000000000000000000000000263ffffffff60601b19978716680100000000000000000297909716600160401b600160801b0319998716640100000000026001600160401b0319909b169c87169c909c1799909917979097169990991793909317959095169390931793909317929092169390931790915560e0830151610100840151909216600160e01b026001600160e01b0390921691909117600955517f5f32d06f5e83eda3a68e0e964ef2e6af5cb613e8117aa103c2d6bca5f5184862906200033790839062000576565b60405180910390a150565b6200034c6200034e565b565b6000546001600160a01b031633146200034c5760405162461bcd60e51b815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000604482015260640162000086565b80516001600160a01b0381168114620003c257600080fd5b919050565b60405161012081016001600160401b0381118282101715620003f957634e487b7160e01b600052604160045260246000fd5b60405290565b805163ffffffff81168114620003c257600080fd5b80516001600160481b0381168114620003c257600080fd5b805164ffffffffff81168114620003c257600080fd5b805161ffff81168114620003c257600080fd5b80516001600160e01b0381168114620003c257600080fd5b60008060008385036101608112156200048557600080fd5b6200049085620003aa565b935061012080601f1983011215620004a757600080fd5b620004b1620003c7565b9150620004c160208701620003ff565b8252620004d160408701620003ff565b6020830152620004e460608701620003ff565b6040830152620004f760808701620003ff565b60608301526200050a60a0870162000414565b60808301526200051d60c087016200042c565b60a08301526200053060e0870162000442565b60c08301526101006200054581880162000455565b60e084015262000557828801620003ff565b908301525091506200056d6101408501620003aa565b90509250925092565b815163ffffffff908116825260208084015182169083015260408084015182169083015260608084015191821690830152610120820190506080830151620005c960808401826001600160481b03169052565b5060a0830151620005e360a084018264ffffffffff169052565b5060c0830151620005fa60c084018261ffff169052565b5060e08301516200061660e08401826001600160e01b03169052565b506101009283015163ffffffff16919092015290565b6080516150856200067260003960008181610845015281816109d301528181610ca601528181610f3a0152818161104501528181611789015261349001526150856000f3fe608060405234801561001057600080fd5b506004361061018d5760003560e01c806381ff7048116100e3578063c3f909d41161008c578063e3d0e71211610066578063e3d0e71214610560578063e4ddcea614610573578063f2fde38b1461058957600080fd5b8063c3f909d4146103b0578063d227d24514610528578063d328a91e1461055857600080fd5b8063a631571e116100bd578063a631571e1461035d578063afcb95d71461037d578063b1dc65a41461039d57600080fd5b806381ff7048146102b557806385b214cf146103225780638da5cb5b1461033557600080fd5b806366316d8d116101455780637f15e1661161011f5780637f15e16614610285578063814118341461029857806381f1b938146102ad57600080fd5b806366316d8d1461026257806379ba5097146102755780637d4807871461027d57600080fd5b8063181f5a7711610176578063181f5a77146101ba5780632a905ccc1461020c57806359b5b7ac1461022e57600080fd5b8063083a5466146101925780631112dadc146101a7575b600080fd5b6101a56101a03660046139fb565b61059c565b005b6101a56101b5366004613ba4565b6105f1565b6101f66040518060400160405280601c81526020017f46756e6374696f6e7320436f6f7264696e61746f722076312e312e300000000081525081565b6040516102039190613cc8565b60405180910390f35b610214610841565b60405168ffffffffffffffffff9091168152602001610203565b61021461023c366004613d69565b50600854700100000000000000000000000000000000900468ffffffffffffffffff1690565b6101a5610270366004613df8565b6108d7565b6101a5610a90565b6101a5610b92565b6101a56102933660046139fb565b610d92565b6102a0610de2565b6040516102039190613e82565b6101f6610e51565b6102ff60015460025463ffffffff74010000000000000000000000000000000000000000830481169378010000000000000000000000000000000000000000000000009093041691565b6040805163ffffffff948516815293909216602084015290820152606001610203565b6101a5610330366004613e95565b610f22565b60005460405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610203565b61037061036b366004613eae565b610fd4565b6040516102039190614003565b604080516001815260006020820181905291810191909152606001610203565b6101a56103ab366004614057565b611175565b61051b6040805161012081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e0810182905261010081019190915250604080516101208101825260085463ffffffff80821683526401000000008204811660208401526801000000000000000082048116938301939093526c01000000000000000000000000810483166060830152700100000000000000000000000000000000810468ffffffffffffffffff166080830152790100000000000000000000000000000000000000000000000000810464ffffffffff1660a08301527e01000000000000000000000000000000000000000000000000000000000000900461ffff1660c08201526009547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff811660e08301527c0100000000000000000000000000000000000000000000000000000000900490911661010082015290565b604051610203919061410e565b61053b6105363660046141fe565b611785565b6040516bffffffffffffffffffffffff9091168152602001610203565b6101f66118e5565b6101a561056e366004614317565b61193c565b61057b6124b8565b604051908152602001610203565b6101a56105973660046143e4565b612711565b6105a4612725565b60008190036105df576040517f4f42be3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600d6105ec82848361449a565b505050565b6105f96127a8565b80516008805460208401516040808601516060870151608088015160a089015160c08a015161ffff167e01000000000000000000000000000000000000000000000000000000000000027dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff64ffffffffff909216790100000000000000000000000000000000000000000000000000027fffff0000000000ffffffffffffffffffffffffffffffffffffffffffffffffff68ffffffffffffffffff90941670010000000000000000000000000000000002939093167fffff0000000000000000000000000000ffffffffffffffffffffffffffffffff63ffffffff9586166c01000000000000000000000000027fffffffffffffffffffffffffffffffff00000000ffffffffffffffffffffffff9787166801000000000000000002979097167fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff998716640100000000027fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000909b169c87169c909c1799909917979097169990991793909317959095169390931793909317929092169390931790915560e08301516101008401519092167c0100000000000000000000000000000000000000000000000000000000027bffffffffffffffffffffffffffffffffffffffffffffffffffffffff90921691909117600955517f5f32d06f5e83eda3a68e0e964ef2e6af5cb613e8117aa103c2d6bca5f51848629061083690839061410e565b60405180910390a150565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16632a905ccc6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156108ae573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108d291906145c0565b905090565b6108df6127b0565b806bffffffffffffffffffffffff166000036109195750336000908152600a60205260409020546bffffffffffffffffffffffff16610973565b336000908152600a60205260409020546bffffffffffffffffffffffff80831691161015610973576040517ff4d678b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336000908152600a6020526040812080548392906109a09084906bffffffffffffffffffffffff1661460c565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055506109f57f000000000000000000000000000000000000000000000000000000000000000090565b6040517f66316d8d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301526bffffffffffffffffffffffff8416602483015291909116906366316d8d90604401600060405180830381600087803b158015610a7457600080fd5b505af1158015610a88573d6000803e3d6000fd5b505050505050565b60015473ffffffffffffffffffffffffffffffffffffffff163314610b16576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064015b60405180910390fd5b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b610b9a6127a8565b610ba26127b0565b6000610bac610de2565b905060005b8151811015610d8e576000600a6000848481518110610bd257610bd2614631565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff168252810191909152604001600020546bffffffffffffffffffffffff1690508015610d7d576000600a6000858581518110610c3157610c31614631565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550610cc87f000000000000000000000000000000000000000000000000000000000000000090565b73ffffffffffffffffffffffffffffffffffffffff166366316d8d848481518110610cf557610cf5614631565b6020026020010151836040518363ffffffff1660e01b8152600401610d4a92919073ffffffffffffffffffffffffffffffffffffffff9290921682526bffffffffffffffffffffffff16602082015260400190565b600060405180830381600087803b158015610d6457600080fd5b505af1158015610d78573d6000803e3d6000fd5b505050505b50610d8781614660565b9050610bb1565b5050565b610d9a612725565b6000819003610dd5576040517f4f42be3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600c6105ec82848361449a565b60606006805480602002602001604051908101604052809291908181526020018280548015610e4757602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311610e1c575b5050505050905090565b6060600d8054610e6090614401565b9050600003610e9b576040517f4f42be3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600d8054610ea890614401565b80601f0160208091040260200160405190810160405280929190818152602001828054610ed490614401565b8015610e475780601f10610ef657610100808354040283529160200191610e47565b820191906000526020600020905b815481529060010190602001808311610f0457509395945050505050565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610f91576040517fc41a5b0900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008181526007602052604080822091909155517f8a4b97add3359bd6bcf5e82874363670eb5ad0f7615abddbd0ed0a3a98f0f416906108369083815260200190565b6040805161016081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810182905261012081018290526101408101919091523373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161461109c576040517fc41a5b0900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6110ad6110a883614698565b61295c565b90506110bf60608301604084016143e4565b815173ffffffffffffffffffffffffffffffffffffffff91909116907fbf50768ccf13bd0110ca6d53a9c4f1f3271abdd4c24a56878863ed25b20598ff3261110d60c0870160a08801614785565b61111f610160880161014089016143e4565b61112988806147a2565b61113b6101208b016101008c01614807565b60208b01356111516101008d0160e08e01614822565b8b6040516111679998979695949392919061483f565b60405180910390a35b919050565b60005a604080518b3580825262ffffff6020808f0135600881901c929092169084015293945092917fb04e63db38c49950639fa09d29872f21f5d49d614f3a969d8adf3d4b52e41a62910160405180910390a16111d68a8a8a8a8a8a612dfa565b6003546000906002906111f49060ff808216916101009004166148e7565b6111fe919061492f565b6112099060016148e7565b60ff169050878114611277576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f77726f6e67206e756d626572206f66207369676e6174757265730000000000006044820152606401610b0d565b878614611306576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f7265706f727420727320616e64207373206d757374206265206f66206571756160448201527f6c206c656e6774680000000000000000000000000000000000000000000000006064820152608401610b0d565b3360009081526004602090815260408083208151808301909252805460ff8082168452929391929184019161010090910416600281111561134957611349614951565b600281111561135a5761135a614951565b905250905060028160200151600281111561137757611377614951565b141580156113c057506006816000015160ff168154811061139a5761139a614631565b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff163314155b15611427576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f756e617574686f72697a6564207472616e736d697474657200000000000000006044820152606401610b0d565b50505050611433613993565b6000808a8a604051611446929190614980565b60405190819003812061145d918e90602001614990565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181528282528051602091820120838301909252600080845290830152915060005b898110156117675760006001848984602081106114c6576114c6614631565b6114d391901a601b6148e7565b8e8e868181106114e5576114e5614631565b905060200201358d8d878181106114fe576114fe614631565b905060200201356040516000815260200160405260405161153b949392919093845260ff9290921660208401526040830152606082015260800190565b6020604051602081039080840390855afa15801561155d573d6000803e3d6000fd5b5050604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081015173ffffffffffffffffffffffffffffffffffffffff811660009081526004602090815290849020838501909452835460ff808216855292965092945084019161010090041660028111156115dd576115dd614951565b60028111156115ee576115ee614951565b905250925060018360200151600281111561160b5761160b614951565b14611672576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f61646472657373206e6f7420617574686f72697a656420746f207369676e00006044820152606401610b0d565b8251600090879060ff16601f811061168c5761168c614631565b602002015173ffffffffffffffffffffffffffffffffffffffff161461170e576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f6e6f6e2d756e69717565207369676e61747572650000000000000000000000006044820152606401610b0d565b8086846000015160ff16601f811061172857611728614631565b73ffffffffffffffffffffffffffffffffffffffff90921660209290920201526117536001866148e7565b9450508061176090614660565b90506114a7565b505050611778833383858e8e612eb1565b5050505050505050505050565b60007f00000000000000000000000000000000000000000000000000000000000000006040517f10fc49c100000000000000000000000000000000000000000000000000000000815267ffffffffffffffff8816600482015263ffffffff8516602482015273ffffffffffffffffffffffffffffffffffffffff91909116906310fc49c19060440160006040518083038186803b15801561182557600080fd5b505afa158015611839573d6000803e3d6000fd5b5050505066038d7ea4c6800082111561187e576040517f8129bbcd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000611888610841565b905060006118cb87878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061023c92505050565b90506118d9858583856130b0565b98975050505050505050565b6060600c80546118f490614401565b905060000361192f576040517f4f42be3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600c8054610ea890614401565b855185518560ff16601f8311156119af576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f746f6f206d616e79207369676e657273000000000000000000000000000000006044820152606401610b0d565b80600003611a19576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f66206d75737420626520706f73697469766500000000000000000000000000006044820152606401610b0d565b818314611aa7576040517f89a61989000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f6f7261636c6520616464726573736573206f7574206f6620726567697374726160448201527f74696f6e000000000000000000000000000000000000000000000000000000006064820152608401610b0d565b611ab28160036149a4565b8311611b1a576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f6661756c74792d6f7261636c65206620746f6f206869676800000000000000006044820152606401610b0d565b611b22612725565b6040805160c0810182528a8152602081018a905260ff89169181018290526060810188905267ffffffffffffffff8716608082015260a0810186905290611b69908861321d565b60055415611d1e57600554600090611b83906001906149bb565b9050600060058281548110611b9a57611b9a614631565b60009182526020822001546006805473ffffffffffffffffffffffffffffffffffffffff90921693509084908110611bd457611bd4614631565b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff85811684526004909252604080842080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000090811690915592909116808452922080549091169055600580549192509080611c5457611c546149ce565b60008281526020902081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90810180547fffffffffffffffffffffffff00000000000000000000000000000000000000001690550190556006805480611cbd57611cbd6149ce565b60008281526020902081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90810180547fffffffffffffffffffffffff000000000000000000000000000000000000000016905501905550611b69915050565b60005b8151518110156122d557815180516000919083908110611d4357611d43614631565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1603611dc8576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f7369676e6572206d757374206e6f7420626520656d70747900000000000000006044820152606401610b0d565b600073ffffffffffffffffffffffffffffffffffffffff1682602001518281518110611df657611df6614631565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1603611e7b576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f7472616e736d6974746572206d757374206e6f7420626520656d7074790000006044820152606401610b0d565b60006004600084600001518481518110611e9757611e97614631565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff16825281019190915260400160002054610100900460ff166002811115611ee157611ee1614951565b14611f48576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f7265706561746564207369676e657220616464726573730000000000000000006044820152606401610b0d565b6040805180820190915260ff82168152600160208201528251805160049160009185908110611f7957611f79614631565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff168252818101929092526040016000208251815460ff9091167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0082168117835592840151919283917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000161761010083600281111561201a5761201a614951565b02179055506000915061202a9050565b600460008460200151848151811061204457612044614631565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff16825281019190915260400160002054610100900460ff16600281111561208e5761208e614951565b146120f5576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f7265706561746564207472616e736d69747465722061646472657373000000006044820152606401610b0d565b6040805180820190915260ff82168152602081016002815250600460008460200151848151811061212857612128614631565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff168252818101929092526040016000208251815460ff9091167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0082168117835592840151919283917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000016176101008360028111156121c9576121c9614951565b0217905550508251805160059250839081106121e7576121e7614631565b602090810291909101810151825460018101845560009384529282902090920180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909316929092179091558201518051600691908390811061226357612263614631565b60209081029190910181015182546001810184556000938452919092200180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909216919091179055806122cd81614660565b915050611d21565b506040810151600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660ff909216919091179055600180547fffffffff00000000ffffffffffffffffffffffffffffffffffffffffffffffff8116780100000000000000000000000000000000000000000000000063ffffffff438116820292909217808555920481169291829160149161238d918491740100000000000000000000000000000000000000009004166149fd565b92506101000a81548163ffffffff021916908363ffffffff1602179055506123ec4630600160149054906101000a900463ffffffff1663ffffffff16856000015186602001518760400151886060015189608001518a60a00151613236565b600281905582518051600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1661010060ff9093169290920291909117905560015460208501516040808701516060880151608089015160a08a015193517f1591690b8638f5fb2dbec82ac741805ac5da8b45dc5263f4875b0496fdce4e05986124a3988b9891977401000000000000000000000000000000000000000090920463ffffffff16969095919491939192614a1a565b60405180910390a15050505050505050505050565b604080516101208101825260085463ffffffff80821683526401000000008204811660208401526801000000000000000082048116838501526c0100000000000000000000000080830482166060850152700100000000000000000000000000000000830468ffffffffffffffffff166080850152790100000000000000000000000000000000000000000000000000830464ffffffffff1660a0808601919091527e0100000000000000000000000000000000000000000000000000000000000090930461ffff1660c08501526009547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff811660e08601527c01000000000000000000000000000000000000000000000000000000009004909116610100840152600b5484517ffeaf968c00000000000000000000000000000000000000000000000000000000815294516000958694859490930473ffffffffffffffffffffffffffffffffffffffff169263feaf968c926004808401938290030181865afa158015612646573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061266a9190614aca565b50935050925050804261267d91906149bb565b836020015163ffffffff1610801561269f57506000836020015163ffffffff16115b156126cd57505060e001517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16919050565b6000821361270a576040517f43d4cf6600000000000000000000000000000000000000000000000000000000815260048101839052602401610b0d565b5092915050565b612719612725565b612722816132e1565b50565b60005473ffffffffffffffffffffffffffffffffffffffff1633146127a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401610b0d565b565b6127a6612725565b600b546bffffffffffffffffffffffff166000036127ca57565b60006127d4610de2565b80519091506000819003612814576040517f30274b3a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600b546000906128339083906bffffffffffffffffffffffff16614b1a565b905060005b828110156128fe5781600a600086848151811061285757612857614631565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282829054906101000a90046bffffffffffffffffffffffff166128bf9190614b45565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550806128f790614660565b9050612838565b506129098282614b6a565b600b80546000906129299084906bffffffffffffffffffffffff1661460c565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550505050565b6040805161016081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e0810182905261010081018290526101208101829052610140810191909152604080516101208101825260085463ffffffff80821683526401000000008204811660208401526801000000000000000082048116938301939093526c0100000000000000000000000081048316606083015268ffffffffffffffffff700100000000000000000000000000000000820416608083015264ffffffffff79010000000000000000000000000000000000000000000000000082041660a083015261ffff7e01000000000000000000000000000000000000000000000000000000000000909104811660c083018190526009547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff811660e08501527c0100000000000000000000000000000000000000000000000000000000900490931661010080840191909152850151919291161115612b17576040517fdada758700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600854600090700100000000000000000000000000000000900468ffffffffffffffffff1690506000612b548560e001513a8488608001516130b0565b9050806bffffffffffffffffffffffff1685606001516bffffffffffffffffffffffff161015612bb0576040517ff4d678b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600083610100015163ffffffff1642612bc99190614b92565b905060003087604001518860a001518960c001516001612be99190614ba5565b8a5180516020918201206101008d015160e08e0151604051612c9d98979695948c918c9132910173ffffffffffffffffffffffffffffffffffffffff9a8b168152988a1660208a015267ffffffffffffffff97881660408a0152959096166060880152608087019390935261ffff9190911660a086015263ffffffff90811660c08601526bffffffffffffffffffffffff9190911660e0850152919091166101008301529091166101208201526101400190565b6040516020818303038152906040528051906020012090506040518061016001604052808281526020013073ffffffffffffffffffffffffffffffffffffffff168152602001846bffffffffffffffffffffffff168152602001886040015173ffffffffffffffffffffffffffffffffffffffff1681526020018860a0015167ffffffffffffffff1681526020018860e0015163ffffffff168152602001886080015168ffffffffffffffffff1681526020018568ffffffffffffffffff168152602001866040015163ffffffff1664ffffffffff168152602001866060015163ffffffff1664ffffffffff1681526020018363ffffffff16815250955085604051602001612dac9190614003565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152918152815160209283012060009384526007909252909120555092949350505050565b6000612e078260206149a4565b612e128560206149a4565b612e1e88610144614b92565b612e289190614b92565b612e329190614b92565b612e3d906000614b92565b9050368114612ea8576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f63616c6c64617461206c656e677468206d69736d6174636800000000000000006044820152606401610b0d565b50505050505050565b600080808080612ec386880188614ca1565b84519499509297509095509350915060ff16801580612ee3575084518114155b80612eef575083518114155b80612efb575082518114155b80612f07575081518114155b15612f6e576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f4669656c6473206d75737420626520657175616c206c656e67746800000000006044820152606401610b0d565b60005b818110156130a1576000613006888381518110612f9057612f90614631565b6020026020010151888481518110612faa57612faa614631565b6020026020010151888581518110612fc457612fc4614631565b6020026020010151888681518110612fde57612fde614631565b6020026020010151888781518110612ff857612ff8614631565b6020026020010151886133d6565b9050600081600681111561301c5761301c614951565b14806130395750600181600681111561303757613037614951565b145b156130905787828151811061305057613050614631565b60209081029190910181015160405133815290917fc708e0440951fd63499c0f7a73819b469ee5dd3ecc356c0ab4eb7f18389009d9910160405180910390a25b5061309a81614660565b9050612f71565b50505050505050505050505050565b600854600090790100000000000000000000000000000000000000000000000000900464ffffffffff1684101561310b57600854790100000000000000000000000000000000000000000000000000900464ffffffffff1693505b600854600090612710906131259063ffffffff16876149a4565b61312f9190614d73565b6131399086614b92565b60085490915060009087906131729063ffffffff6c010000000000000000000000008204811691680100000000000000009004166149fd565b61317c91906149fd565b63ffffffff16905060006131c66000368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061371192505050565b905060006131e7826131d885876149a4565b6131e29190614b92565b613853565b9050600061320368ffffffffffffffffff808916908a16614b45565b905061320f8183614b45565b9a9950505050505050505050565b6000613227610de2565b511115610d8e57610d8e6127b0565b6000808a8a8a8a8a8a8a8a8a60405160200161325a99989796959493929190614d87565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291905280516020909101207dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e01000000000000000000000000000000000000000000000000000000000000179150509998505050505050505050565b3373ffffffffffffffffffffffffffffffffffffffff821603613360576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401610b0d565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b600080848060200190518101906133ed9190614e53565b905060003a8261012001518361010001516134089190614f1b565b64ffffffffff1661341991906149a4565b905060008460ff166134616000368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061371192505050565b61346b9190614d73565b9050600061347c6131e28385614b92565b905060006134893a613853565b90506000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663330605298e8e868b60e0015168ffffffffffffffffff16896134e89190614b45565b338d6040518763ffffffff1660e01b815260040161350b96959493929190614f39565b60408051808303816000875af1158015613529573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061354d9190614fb5565b9092509050600082600681111561356657613566614951565b14806135835750600182600681111561358157613581614951565b145b156137005760008e8152600760205260408120556135a18185614b45565b336000908152600a6020526040812080549091906135ce9084906bffffffffffffffffffffffff16614b45565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055508660e0015168ffffffffffffffffff16600b60008282829054906101000a90046bffffffffffffffffffffffff166136349190614b45565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055508d7f90815c2e624694e8010bffad2bcefaf96af282ef1bc2ebc0042d1b89a585e0468487848b60c0015168ffffffffffffffffff168c60e0015168ffffffffffffffffff16878b6136b39190614b45565b6136bd9190614b45565b6136c79190614b45565b604080516bffffffffffffffffffffffff9586168152602081019490945291841683830152909216606082015290519081900360800190a25b509c9b505050505050505050505050565b60004661371d81613887565b1561379957606c73ffffffffffffffffffffffffffffffffffffffff1663c6f7de0e6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561376e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906137929190614fe8565b9392505050565b6137a2816138aa565b1561384a5773420000000000000000000000000000000000000f73ffffffffffffffffffffffffffffffffffffffff166349948e0e8460405180608001604052806048815260200161503160489139604051602001613802929190615001565b6040516020818303038152906040526040518263ffffffff1660e01b815260040161382d9190613cc8565b602060405180830381865afa15801561376e573d6000803e3d6000fd5b50600092915050565b60006138816138606124b8565b61387284670de0b6b3a76400006149a4565b61387c9190614d73565b6138f1565b92915050565b600061a4b182148061389b575062066eed82145b8061388157505062066eee1490565b6000600a8214806138bc57506101a482145b806138c9575062aa37dc82145b806138d5575061210582145b806138e2575062014a3382145b8061388157505062014a341490565b60006bffffffffffffffffffffffff82111561398f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203960448201527f36206269747300000000000000000000000000000000000000000000000000006064820152608401610b0d565b5090565b604051806103e00160405280601f906020820280368337509192915050565b60008083601f8401126139c457600080fd5b50813567ffffffffffffffff8111156139dc57600080fd5b6020830191508360208285010111156139f457600080fd5b9250929050565b60008060208385031215613a0e57600080fd5b823567ffffffffffffffff811115613a2557600080fd5b613a31858286016139b2565b90969095509350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051610120810167ffffffffffffffff81118282101715613a9057613a90613a3d565b60405290565b604051610160810167ffffffffffffffff81118282101715613a9057613a90613a3d565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715613b0157613b01613a3d565b604052919050565b63ffffffff8116811461272257600080fd5b803561117081613b09565b68ffffffffffffffffff8116811461272257600080fd5b803561117081613b26565b64ffffffffff8116811461272257600080fd5b803561117081613b48565b803561ffff8116811461117057600080fd5b80357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8116811461117057600080fd5b60006101208284031215613bb757600080fd5b613bbf613a6c565b613bc883613b1b565b8152613bd660208401613b1b565b6020820152613be760408401613b1b565b6040820152613bf860608401613b1b565b6060820152613c0960808401613b3d565b6080820152613c1a60a08401613b5b565b60a0820152613c2b60c08401613b66565b60c0820152613c3c60e08401613b78565b60e0820152610100613c4f818501613b1b565b908201529392505050565b60005b83811015613c75578181015183820152602001613c5d565b50506000910152565b60008151808452613c96816020860160208601613c5a565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006137926020830184613c7e565b600082601f830112613cec57600080fd5b813567ffffffffffffffff811115613d0657613d06613a3d565b613d3760207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601613aba565b818152846020838601011115613d4c57600080fd5b816020850160208301376000918101602001919091529392505050565b600060208284031215613d7b57600080fd5b813567ffffffffffffffff811115613d9257600080fd5b613d9e84828501613cdb565b949350505050565b73ffffffffffffffffffffffffffffffffffffffff8116811461272257600080fd5b803561117081613da6565b6bffffffffffffffffffffffff8116811461272257600080fd5b803561117081613dd3565b60008060408385031215613e0b57600080fd5b8235613e1681613da6565b91506020830135613e2681613dd3565b809150509250929050565b600081518084526020808501945080840160005b83811015613e7757815173ffffffffffffffffffffffffffffffffffffffff1687529582019590820190600101613e45565b509495945050505050565b6020815260006137926020830184613e31565b600060208284031215613ea757600080fd5b5035919050565b600060208284031215613ec057600080fd5b813567ffffffffffffffff811115613ed757600080fd5b8201610160818503121561379257600080fd5b805182526020810151613f15602084018273ffffffffffffffffffffffffffffffffffffffff169052565b506040810151613f3560408401826bffffffffffffffffffffffff169052565b506060810151613f5d606084018273ffffffffffffffffffffffffffffffffffffffff169052565b506080810151613f79608084018267ffffffffffffffff169052565b5060a0810151613f9160a084018263ffffffff169052565b5060c0810151613fae60c084018268ffffffffffffffffff169052565b5060e0810151613fcb60e084018268ffffffffffffffffff169052565b506101008181015164ffffffffff9081169184019190915261012080830151909116908301526101409081015163ffffffff16910152565b61016081016138818284613eea565b60008083601f84011261402457600080fd5b50813567ffffffffffffffff81111561403c57600080fd5b6020830191508360208260051b85010111156139f457600080fd5b60008060008060008060008060e0898b03121561407357600080fd5b606089018a81111561408457600080fd5b8998503567ffffffffffffffff8082111561409e57600080fd5b6140aa8c838d016139b2565b909950975060808b01359150808211156140c357600080fd5b6140cf8c838d01614012565b909750955060a08b01359150808211156140e857600080fd5b506140f58b828c01614012565b999c989b50969995989497949560c00135949350505050565b815163ffffffff908116825260208084015182169083015260408084015182169083015260608084015191821690830152610120820190506080830151614162608084018268ffffffffffffffffff169052565b5060a083015161417b60a084018264ffffffffff169052565b5060c083015161419160c084018261ffff169052565b5060e08301516141c160e08401827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff169052565b506101008381015163ffffffff8116848301525b505092915050565b67ffffffffffffffff8116811461272257600080fd5b8035611170816141dd565b60008060008060006080868803121561421657600080fd5b8535614221816141dd565b9450602086013567ffffffffffffffff81111561423d57600080fd5b614249888289016139b2565b909550935050604086013561425d81613b09565b949793965091946060013592915050565b600067ffffffffffffffff82111561428857614288613a3d565b5060051b60200190565b600082601f8301126142a357600080fd5b813560206142b86142b38361426e565b613aba565b82815260059290921b840181019181810190868411156142d757600080fd5b8286015b848110156142fb5780356142ee81613da6565b83529183019183016142db565b509695505050505050565b803560ff8116811461117057600080fd5b60008060008060008060c0878903121561433057600080fd5b863567ffffffffffffffff8082111561434857600080fd5b6143548a838b01614292565b9750602089013591508082111561436a57600080fd5b6143768a838b01614292565b965061438460408a01614306565b9550606089013591508082111561439a57600080fd5b6143a68a838b01613cdb565b94506143b460808a016141f3565b935060a08901359150808211156143ca57600080fd5b506143d789828a01613cdb565b9150509295509295509295565b6000602082840312156143f657600080fd5b813561379281613da6565b600181811c9082168061441557607f821691505b60208210810361444e577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b601f8211156105ec57600081815260208120601f850160051c8101602086101561447b5750805b601f850160051c820191505b81811015610a8857828155600101614487565b67ffffffffffffffff8311156144b2576144b2613a3d565b6144c6836144c08354614401565b83614454565b6000601f84116001811461451857600085156144e25750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b1783556145ae565b6000838152602090207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0861690835b828110156145675786850135825560209485019460019092019101614547565b50868210156145a2577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b805161117081613b26565b6000602082840312156145d257600080fd5b815161379281613b26565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6bffffffffffffffffffffffff82811682821603908082111561270a5761270a6145dd565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203614691576146916145dd565b5060010190565b600061016082360312156146ab57600080fd5b6146b3613a96565b823567ffffffffffffffff8111156146ca57600080fd5b6146d636828601613cdb565b825250602083013560208201526146ef60408401613dc8565b604082015261470060608401613ded565b606082015261471160808401613b3d565b608082015261472260a084016141f3565b60a082015261473360c084016141f3565b60c082015261474460e08401613b1b565b60e0820152610100614757818501613b66565b908201526101206147698482016141f3565b9082015261014061477b848201613dc8565b9082015292915050565b60006020828403121561479757600080fd5b8135613792816141dd565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18436030181126147d757600080fd5b83018035915067ffffffffffffffff8211156147f257600080fd5b6020019150368190038213156139f457600080fd5b60006020828403121561481957600080fd5b61379282613b66565b60006020828403121561483457600080fd5b813561379281613b09565b73ffffffffffffffffffffffffffffffffffffffff8a8116825267ffffffffffffffff8a166020830152881660408201526102406060820181905281018690526000610260878982850137600083890182015261ffff8716608084015260a0830186905263ffffffff851660c0840152601f88017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016830101905061320f60e0830184613eea565b60ff8181168382160190811115613881576138816145dd565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600060ff83168061494257614942614900565b8060ff84160491505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b8183823760009101908152919050565b828152606082602083013760800192915050565b8082028115828204841417613881576138816145dd565b81810381811115613881576138816145dd565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b63ffffffff81811683821601908082111561270a5761270a6145dd565b600061012063ffffffff808d1684528b6020850152808b16604085015250806060840152614a4a8184018a613e31565b90508281036080840152614a5e8189613e31565b905060ff871660a084015282810360c0840152614a7b8187613c7e565b905067ffffffffffffffff851660e0840152828103610100840152614aa08185613c7e565b9c9b505050505050505050505050565b805169ffffffffffffffffffff8116811461117057600080fd5b600080600080600060a08688031215614ae257600080fd5b614aeb86614ab0565b9450602086015193506040860151925060608601519150614b0e60808701614ab0565b90509295509295909350565b60006bffffffffffffffffffffffff80841680614b3957614b39614900565b92169190910492915050565b6bffffffffffffffffffffffff81811683821601908082111561270a5761270a6145dd565b6bffffffffffffffffffffffff8181168382160280821691908281146141d5576141d56145dd565b80820180821115613881576138816145dd565b67ffffffffffffffff81811683821601908082111561270a5761270a6145dd565b600082601f830112614bd757600080fd5b81356020614be76142b38361426e565b82815260059290921b84018101918181019086841115614c0657600080fd5b8286015b848110156142fb5780358352918301918301614c0a565b600082601f830112614c3257600080fd5b81356020614c426142b38361426e565b82815260059290921b84018101918181019086841115614c6157600080fd5b8286015b848110156142fb57803567ffffffffffffffff811115614c855760008081fd5b614c938986838b0101613cdb565b845250918301918301614c65565b600080600080600060a08688031215614cb957600080fd5b853567ffffffffffffffff80821115614cd157600080fd5b614cdd89838a01614bc6565b96506020880135915080821115614cf357600080fd5b614cff89838a01614c21565b95506040880135915080821115614d1557600080fd5b614d2189838a01614c21565b94506060880135915080821115614d3757600080fd5b614d4389838a01614c21565b93506080880135915080821115614d5957600080fd5b50614d6688828901614c21565b9150509295509295909350565b600082614d8257614d82614900565b500490565b60006101208b835273ffffffffffffffffffffffffffffffffffffffff8b16602084015267ffffffffffffffff808b166040850152816060850152614dce8285018b613e31565b91508382036080850152614de2828a613e31565b915060ff881660a085015283820360c0850152614dff8288613c7e565b90861660e08501528381036101008501529050614aa08185613c7e565b805161117081613da6565b805161117081613dd3565b8051611170816141dd565b805161117081613b09565b805161117081613b48565b60006101608284031215614e6657600080fd5b614e6e613a96565b82518152614e7e60208401614e1c565b6020820152614e8f60408401614e27565b6040820152614ea060608401614e1c565b6060820152614eb160808401614e32565b6080820152614ec260a08401614e3d565b60a0820152614ed360c084016145b5565b60c0820152614ee460e084016145b5565b60e0820152610100614ef7818501614e48565b90820152610120614f09848201614e48565b90820152610140613c4f848201614e3d565b64ffffffffff81811683821601908082111561270a5761270a6145dd565b6000610200808352614f4d8184018a613c7e565b90508281036020840152614f618189613c7e565b6bffffffffffffffffffffffff88811660408601528716606085015273ffffffffffffffffffffffffffffffffffffffff861660808501529150614faa905060a0830184613eea565b979650505050505050565b60008060408385031215614fc857600080fd5b825160078110614fd757600080fd5b6020840151909250613e2681613dd3565b600060208284031215614ffa57600080fd5b5051919050565b60008351615013818460208801613c5a565b835190830190615027818360208801613c5a565b0194935050505056fe307866666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666a164736f6c6343000813000a", +} + +var FunctionsCoordinator110ABI = FunctionsCoordinator110MetaData.ABI + +var FunctionsCoordinator110Bin = FunctionsCoordinator110MetaData.Bin + +func DeployFunctionsCoordinator110(auth *bind.TransactOpts, backend bind.ContractBackend, router common.Address, config FunctionsBillingConfig, linkToNativeFeed common.Address) (common.Address, *types.Transaction, *FunctionsCoordinator110, error) { + parsed, err := FunctionsCoordinator110MetaData.GetAbi() + if err != nil { + return common.Address{}, nil, nil, err + } + if parsed == nil { + return common.Address{}, nil, nil, errors.New("GetABI returned nil") + } + + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(FunctionsCoordinator110Bin), backend, router, config, linkToNativeFeed) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &FunctionsCoordinator110{address: address, abi: *parsed, FunctionsCoordinator110Caller: FunctionsCoordinator110Caller{contract: contract}, FunctionsCoordinator110Transactor: FunctionsCoordinator110Transactor{contract: contract}, FunctionsCoordinator110Filterer: FunctionsCoordinator110Filterer{contract: contract}}, nil +} + +type FunctionsCoordinator110 struct { + address common.Address + abi abi.ABI + FunctionsCoordinator110Caller + FunctionsCoordinator110Transactor + FunctionsCoordinator110Filterer +} + +type FunctionsCoordinator110Caller struct { + contract *bind.BoundContract +} + +type FunctionsCoordinator110Transactor struct { + contract *bind.BoundContract +} + +type FunctionsCoordinator110Filterer struct { + contract *bind.BoundContract +} + +type FunctionsCoordinator110Session struct { + Contract *FunctionsCoordinator110 + CallOpts bind.CallOpts + TransactOpts bind.TransactOpts +} + +type FunctionsCoordinator110CallerSession struct { + Contract *FunctionsCoordinator110Caller + CallOpts bind.CallOpts +} + +type FunctionsCoordinator110TransactorSession struct { + Contract *FunctionsCoordinator110Transactor + TransactOpts bind.TransactOpts +} + +type FunctionsCoordinator110Raw struct { + Contract *FunctionsCoordinator110 +} + +type FunctionsCoordinator110CallerRaw struct { + Contract *FunctionsCoordinator110Caller +} + +type FunctionsCoordinator110TransactorRaw struct { + Contract *FunctionsCoordinator110Transactor +} + +func NewFunctionsCoordinator110(address common.Address, backend bind.ContractBackend) (*FunctionsCoordinator110, error) { + abi, err := abi.JSON(strings.NewReader(FunctionsCoordinator110ABI)) + if err != nil { + return nil, err + } + contract, err := bindFunctionsCoordinator110(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &FunctionsCoordinator110{address: address, abi: abi, FunctionsCoordinator110Caller: FunctionsCoordinator110Caller{contract: contract}, FunctionsCoordinator110Transactor: FunctionsCoordinator110Transactor{contract: contract}, FunctionsCoordinator110Filterer: FunctionsCoordinator110Filterer{contract: contract}}, nil +} + +func NewFunctionsCoordinator110Caller(address common.Address, caller bind.ContractCaller) (*FunctionsCoordinator110Caller, error) { + contract, err := bindFunctionsCoordinator110(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &FunctionsCoordinator110Caller{contract: contract}, nil +} + +func NewFunctionsCoordinator110Transactor(address common.Address, transactor bind.ContractTransactor) (*FunctionsCoordinator110Transactor, error) { + contract, err := bindFunctionsCoordinator110(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &FunctionsCoordinator110Transactor{contract: contract}, nil +} + +func NewFunctionsCoordinator110Filterer(address common.Address, filterer bind.ContractFilterer) (*FunctionsCoordinator110Filterer, error) { + contract, err := bindFunctionsCoordinator110(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &FunctionsCoordinator110Filterer{contract: contract}, nil +} + +func bindFunctionsCoordinator110(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := FunctionsCoordinator110MetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110Raw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _FunctionsCoordinator110.Contract.FunctionsCoordinator110Caller.contract.Call(opts, result, method, params...) +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _FunctionsCoordinator110.Contract.FunctionsCoordinator110Transactor.contract.Transfer(opts) +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _FunctionsCoordinator110.Contract.FunctionsCoordinator110Transactor.contract.Transact(opts, method, params...) +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110CallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _FunctionsCoordinator110.Contract.contract.Call(opts, result, method, params...) +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _FunctionsCoordinator110.Contract.contract.Transfer(opts) +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _FunctionsCoordinator110.Contract.contract.Transact(opts, method, params...) +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110Caller) EstimateCost(opts *bind.CallOpts, subscriptionId uint64, data []byte, callbackGasLimit uint32, gasPriceWei *big.Int) (*big.Int, error) { + var out []interface{} + err := _FunctionsCoordinator110.contract.Call(opts, &out, "estimateCost", subscriptionId, data, callbackGasLimit, gasPriceWei) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110Session) EstimateCost(subscriptionId uint64, data []byte, callbackGasLimit uint32, gasPriceWei *big.Int) (*big.Int, error) { + return _FunctionsCoordinator110.Contract.EstimateCost(&_FunctionsCoordinator110.CallOpts, subscriptionId, data, callbackGasLimit, gasPriceWei) +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110CallerSession) EstimateCost(subscriptionId uint64, data []byte, callbackGasLimit uint32, gasPriceWei *big.Int) (*big.Int, error) { + return _FunctionsCoordinator110.Contract.EstimateCost(&_FunctionsCoordinator110.CallOpts, subscriptionId, data, callbackGasLimit, gasPriceWei) +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110Caller) GetAdminFee(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _FunctionsCoordinator110.contract.Call(opts, &out, "getAdminFee") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110Session) GetAdminFee() (*big.Int, error) { + return _FunctionsCoordinator110.Contract.GetAdminFee(&_FunctionsCoordinator110.CallOpts) +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110CallerSession) GetAdminFee() (*big.Int, error) { + return _FunctionsCoordinator110.Contract.GetAdminFee(&_FunctionsCoordinator110.CallOpts) +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110Caller) GetConfig(opts *bind.CallOpts) (FunctionsBillingConfig, error) { + var out []interface{} + err := _FunctionsCoordinator110.contract.Call(opts, &out, "getConfig") + + if err != nil { + return *new(FunctionsBillingConfig), err + } + + out0 := *abi.ConvertType(out[0], new(FunctionsBillingConfig)).(*FunctionsBillingConfig) + + return out0, err + +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110Session) GetConfig() (FunctionsBillingConfig, error) { + return _FunctionsCoordinator110.Contract.GetConfig(&_FunctionsCoordinator110.CallOpts) +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110CallerSession) GetConfig() (FunctionsBillingConfig, error) { + return _FunctionsCoordinator110.Contract.GetConfig(&_FunctionsCoordinator110.CallOpts) +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110Caller) GetDONFee(opts *bind.CallOpts, arg0 []byte) (*big.Int, error) { + var out []interface{} + err := _FunctionsCoordinator110.contract.Call(opts, &out, "getDONFee", arg0) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110Session) GetDONFee(arg0 []byte) (*big.Int, error) { + return _FunctionsCoordinator110.Contract.GetDONFee(&_FunctionsCoordinator110.CallOpts, arg0) +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110CallerSession) GetDONFee(arg0 []byte) (*big.Int, error) { + return _FunctionsCoordinator110.Contract.GetDONFee(&_FunctionsCoordinator110.CallOpts, arg0) +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110Caller) GetDONPublicKey(opts *bind.CallOpts) ([]byte, error) { + var out []interface{} + err := _FunctionsCoordinator110.contract.Call(opts, &out, "getDONPublicKey") + + if err != nil { + return *new([]byte), err + } + + out0 := *abi.ConvertType(out[0], new([]byte)).(*[]byte) + + return out0, err + +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110Session) GetDONPublicKey() ([]byte, error) { + return _FunctionsCoordinator110.Contract.GetDONPublicKey(&_FunctionsCoordinator110.CallOpts) +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110CallerSession) GetDONPublicKey() ([]byte, error) { + return _FunctionsCoordinator110.Contract.GetDONPublicKey(&_FunctionsCoordinator110.CallOpts) +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110Caller) GetThresholdPublicKey(opts *bind.CallOpts) ([]byte, error) { + var out []interface{} + err := _FunctionsCoordinator110.contract.Call(opts, &out, "getThresholdPublicKey") + + if err != nil { + return *new([]byte), err + } + + out0 := *abi.ConvertType(out[0], new([]byte)).(*[]byte) + + return out0, err + +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110Session) GetThresholdPublicKey() ([]byte, error) { + return _FunctionsCoordinator110.Contract.GetThresholdPublicKey(&_FunctionsCoordinator110.CallOpts) +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110CallerSession) GetThresholdPublicKey() ([]byte, error) { + return _FunctionsCoordinator110.Contract.GetThresholdPublicKey(&_FunctionsCoordinator110.CallOpts) +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110Caller) GetWeiPerUnitLink(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _FunctionsCoordinator110.contract.Call(opts, &out, "getWeiPerUnitLink") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110Session) GetWeiPerUnitLink() (*big.Int, error) { + return _FunctionsCoordinator110.Contract.GetWeiPerUnitLink(&_FunctionsCoordinator110.CallOpts) +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110CallerSession) GetWeiPerUnitLink() (*big.Int, error) { + return _FunctionsCoordinator110.Contract.GetWeiPerUnitLink(&_FunctionsCoordinator110.CallOpts) +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110Caller) LatestConfigDetails(opts *bind.CallOpts) (LatestConfigDetails, + + error) { + var out []interface{} + err := _FunctionsCoordinator110.contract.Call(opts, &out, "latestConfigDetails") + + outstruct := new(LatestConfigDetails) + if err != nil { + return *outstruct, err + } + + outstruct.ConfigCount = *abi.ConvertType(out[0], new(uint32)).(*uint32) + outstruct.BlockNumber = *abi.ConvertType(out[1], new(uint32)).(*uint32) + outstruct.ConfigDigest = *abi.ConvertType(out[2], new([32]byte)).(*[32]byte) + + return *outstruct, err + +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110Session) LatestConfigDetails() (LatestConfigDetails, + + error) { + return _FunctionsCoordinator110.Contract.LatestConfigDetails(&_FunctionsCoordinator110.CallOpts) +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110CallerSession) LatestConfigDetails() (LatestConfigDetails, + + error) { + return _FunctionsCoordinator110.Contract.LatestConfigDetails(&_FunctionsCoordinator110.CallOpts) +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110Caller) LatestConfigDigestAndEpoch(opts *bind.CallOpts) (LatestConfigDigestAndEpoch, + + error) { + var out []interface{} + err := _FunctionsCoordinator110.contract.Call(opts, &out, "latestConfigDigestAndEpoch") + + outstruct := new(LatestConfigDigestAndEpoch) + if err != nil { + return *outstruct, err + } + + outstruct.ScanLogs = *abi.ConvertType(out[0], new(bool)).(*bool) + outstruct.ConfigDigest = *abi.ConvertType(out[1], new([32]byte)).(*[32]byte) + outstruct.Epoch = *abi.ConvertType(out[2], new(uint32)).(*uint32) + + return *outstruct, err + +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110Session) LatestConfigDigestAndEpoch() (LatestConfigDigestAndEpoch, + + error) { + return _FunctionsCoordinator110.Contract.LatestConfigDigestAndEpoch(&_FunctionsCoordinator110.CallOpts) +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110CallerSession) LatestConfigDigestAndEpoch() (LatestConfigDigestAndEpoch, + + error) { + return _FunctionsCoordinator110.Contract.LatestConfigDigestAndEpoch(&_FunctionsCoordinator110.CallOpts) +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110Caller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _FunctionsCoordinator110.contract.Call(opts, &out, "owner") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110Session) Owner() (common.Address, error) { + return _FunctionsCoordinator110.Contract.Owner(&_FunctionsCoordinator110.CallOpts) +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110CallerSession) Owner() (common.Address, error) { + return _FunctionsCoordinator110.Contract.Owner(&_FunctionsCoordinator110.CallOpts) +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110Caller) Transmitters(opts *bind.CallOpts) ([]common.Address, error) { + var out []interface{} + err := _FunctionsCoordinator110.contract.Call(opts, &out, "transmitters") + + if err != nil { + return *new([]common.Address), err + } + + out0 := *abi.ConvertType(out[0], new([]common.Address)).(*[]common.Address) + + return out0, err + +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110Session) Transmitters() ([]common.Address, error) { + return _FunctionsCoordinator110.Contract.Transmitters(&_FunctionsCoordinator110.CallOpts) +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110CallerSession) Transmitters() ([]common.Address, error) { + return _FunctionsCoordinator110.Contract.Transmitters(&_FunctionsCoordinator110.CallOpts) +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110Caller) TypeAndVersion(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _FunctionsCoordinator110.contract.Call(opts, &out, "typeAndVersion") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110Session) TypeAndVersion() (string, error) { + return _FunctionsCoordinator110.Contract.TypeAndVersion(&_FunctionsCoordinator110.CallOpts) +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110CallerSession) TypeAndVersion() (string, error) { + return _FunctionsCoordinator110.Contract.TypeAndVersion(&_FunctionsCoordinator110.CallOpts) +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110Transactor) AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _FunctionsCoordinator110.contract.Transact(opts, "acceptOwnership") +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110Session) AcceptOwnership() (*types.Transaction, error) { + return _FunctionsCoordinator110.Contract.AcceptOwnership(&_FunctionsCoordinator110.TransactOpts) +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110TransactorSession) AcceptOwnership() (*types.Transaction, error) { + return _FunctionsCoordinator110.Contract.AcceptOwnership(&_FunctionsCoordinator110.TransactOpts) +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110Transactor) DeleteCommitment(opts *bind.TransactOpts, requestId [32]byte) (*types.Transaction, error) { + return _FunctionsCoordinator110.contract.Transact(opts, "deleteCommitment", requestId) +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110Session) DeleteCommitment(requestId [32]byte) (*types.Transaction, error) { + return _FunctionsCoordinator110.Contract.DeleteCommitment(&_FunctionsCoordinator110.TransactOpts, requestId) +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110TransactorSession) DeleteCommitment(requestId [32]byte) (*types.Transaction, error) { + return _FunctionsCoordinator110.Contract.DeleteCommitment(&_FunctionsCoordinator110.TransactOpts, requestId) +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110Transactor) OracleWithdraw(opts *bind.TransactOpts, recipient common.Address, amount *big.Int) (*types.Transaction, error) { + return _FunctionsCoordinator110.contract.Transact(opts, "oracleWithdraw", recipient, amount) +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110Session) OracleWithdraw(recipient common.Address, amount *big.Int) (*types.Transaction, error) { + return _FunctionsCoordinator110.Contract.OracleWithdraw(&_FunctionsCoordinator110.TransactOpts, recipient, amount) +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110TransactorSession) OracleWithdraw(recipient common.Address, amount *big.Int) (*types.Transaction, error) { + return _FunctionsCoordinator110.Contract.OracleWithdraw(&_FunctionsCoordinator110.TransactOpts, recipient, amount) +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110Transactor) OracleWithdrawAll(opts *bind.TransactOpts) (*types.Transaction, error) { + return _FunctionsCoordinator110.contract.Transact(opts, "oracleWithdrawAll") +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110Session) OracleWithdrawAll() (*types.Transaction, error) { + return _FunctionsCoordinator110.Contract.OracleWithdrawAll(&_FunctionsCoordinator110.TransactOpts) +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110TransactorSession) OracleWithdrawAll() (*types.Transaction, error) { + return _FunctionsCoordinator110.Contract.OracleWithdrawAll(&_FunctionsCoordinator110.TransactOpts) +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110Transactor) SetConfig(opts *bind.TransactOpts, _signers []common.Address, _transmitters []common.Address, _f uint8, _onchainConfig []byte, _offchainConfigVersion uint64, _offchainConfig []byte) (*types.Transaction, error) { + return _FunctionsCoordinator110.contract.Transact(opts, "setConfig", _signers, _transmitters, _f, _onchainConfig, _offchainConfigVersion, _offchainConfig) +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110Session) SetConfig(_signers []common.Address, _transmitters []common.Address, _f uint8, _onchainConfig []byte, _offchainConfigVersion uint64, _offchainConfig []byte) (*types.Transaction, error) { + return _FunctionsCoordinator110.Contract.SetConfig(&_FunctionsCoordinator110.TransactOpts, _signers, _transmitters, _f, _onchainConfig, _offchainConfigVersion, _offchainConfig) +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110TransactorSession) SetConfig(_signers []common.Address, _transmitters []common.Address, _f uint8, _onchainConfig []byte, _offchainConfigVersion uint64, _offchainConfig []byte) (*types.Transaction, error) { + return _FunctionsCoordinator110.Contract.SetConfig(&_FunctionsCoordinator110.TransactOpts, _signers, _transmitters, _f, _onchainConfig, _offchainConfigVersion, _offchainConfig) +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110Transactor) SetDONPublicKey(opts *bind.TransactOpts, donPublicKey []byte) (*types.Transaction, error) { + return _FunctionsCoordinator110.contract.Transact(opts, "setDONPublicKey", donPublicKey) +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110Session) SetDONPublicKey(donPublicKey []byte) (*types.Transaction, error) { + return _FunctionsCoordinator110.Contract.SetDONPublicKey(&_FunctionsCoordinator110.TransactOpts, donPublicKey) +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110TransactorSession) SetDONPublicKey(donPublicKey []byte) (*types.Transaction, error) { + return _FunctionsCoordinator110.Contract.SetDONPublicKey(&_FunctionsCoordinator110.TransactOpts, donPublicKey) +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110Transactor) SetThresholdPublicKey(opts *bind.TransactOpts, thresholdPublicKey []byte) (*types.Transaction, error) { + return _FunctionsCoordinator110.contract.Transact(opts, "setThresholdPublicKey", thresholdPublicKey) +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110Session) SetThresholdPublicKey(thresholdPublicKey []byte) (*types.Transaction, error) { + return _FunctionsCoordinator110.Contract.SetThresholdPublicKey(&_FunctionsCoordinator110.TransactOpts, thresholdPublicKey) +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110TransactorSession) SetThresholdPublicKey(thresholdPublicKey []byte) (*types.Transaction, error) { + return _FunctionsCoordinator110.Contract.SetThresholdPublicKey(&_FunctionsCoordinator110.TransactOpts, thresholdPublicKey) +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110Transactor) StartRequest(opts *bind.TransactOpts, request FunctionsResponseRequestMeta) (*types.Transaction, error) { + return _FunctionsCoordinator110.contract.Transact(opts, "startRequest", request) +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110Session) StartRequest(request FunctionsResponseRequestMeta) (*types.Transaction, error) { + return _FunctionsCoordinator110.Contract.StartRequest(&_FunctionsCoordinator110.TransactOpts, request) +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110TransactorSession) StartRequest(request FunctionsResponseRequestMeta) (*types.Transaction, error) { + return _FunctionsCoordinator110.Contract.StartRequest(&_FunctionsCoordinator110.TransactOpts, request) +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110Transactor) TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) { + return _FunctionsCoordinator110.contract.Transact(opts, "transferOwnership", to) +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110Session) TransferOwnership(to common.Address) (*types.Transaction, error) { + return _FunctionsCoordinator110.Contract.TransferOwnership(&_FunctionsCoordinator110.TransactOpts, to) +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110TransactorSession) TransferOwnership(to common.Address) (*types.Transaction, error) { + return _FunctionsCoordinator110.Contract.TransferOwnership(&_FunctionsCoordinator110.TransactOpts, to) +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110Transactor) Transmit(opts *bind.TransactOpts, reportContext [3][32]byte, report []byte, rs [][32]byte, ss [][32]byte, rawVs [32]byte) (*types.Transaction, error) { + return _FunctionsCoordinator110.contract.Transact(opts, "transmit", reportContext, report, rs, ss, rawVs) +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110Session) Transmit(reportContext [3][32]byte, report []byte, rs [][32]byte, ss [][32]byte, rawVs [32]byte) (*types.Transaction, error) { + return _FunctionsCoordinator110.Contract.Transmit(&_FunctionsCoordinator110.TransactOpts, reportContext, report, rs, ss, rawVs) +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110TransactorSession) Transmit(reportContext [3][32]byte, report []byte, rs [][32]byte, ss [][32]byte, rawVs [32]byte) (*types.Transaction, error) { + return _FunctionsCoordinator110.Contract.Transmit(&_FunctionsCoordinator110.TransactOpts, reportContext, report, rs, ss, rawVs) +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110Transactor) UpdateConfig(opts *bind.TransactOpts, config FunctionsBillingConfig) (*types.Transaction, error) { + return _FunctionsCoordinator110.contract.Transact(opts, "updateConfig", config) +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110Session) UpdateConfig(config FunctionsBillingConfig) (*types.Transaction, error) { + return _FunctionsCoordinator110.Contract.UpdateConfig(&_FunctionsCoordinator110.TransactOpts, config) +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110TransactorSession) UpdateConfig(config FunctionsBillingConfig) (*types.Transaction, error) { + return _FunctionsCoordinator110.Contract.UpdateConfig(&_FunctionsCoordinator110.TransactOpts, config) +} + +type FunctionsCoordinator110CommitmentDeletedIterator struct { + Event *FunctionsCoordinator110CommitmentDeleted + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *FunctionsCoordinator110CommitmentDeletedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(FunctionsCoordinator110CommitmentDeleted) + 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(FunctionsCoordinator110CommitmentDeleted) + 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 *FunctionsCoordinator110CommitmentDeletedIterator) Error() error { + return it.fail +} + +func (it *FunctionsCoordinator110CommitmentDeletedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type FunctionsCoordinator110CommitmentDeleted struct { + RequestId [32]byte + Raw types.Log +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110Filterer) FilterCommitmentDeleted(opts *bind.FilterOpts) (*FunctionsCoordinator110CommitmentDeletedIterator, error) { + + logs, sub, err := _FunctionsCoordinator110.contract.FilterLogs(opts, "CommitmentDeleted") + if err != nil { + return nil, err + } + return &FunctionsCoordinator110CommitmentDeletedIterator{contract: _FunctionsCoordinator110.contract, event: "CommitmentDeleted", logs: logs, sub: sub}, nil +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110Filterer) WatchCommitmentDeleted(opts *bind.WatchOpts, sink chan<- *FunctionsCoordinator110CommitmentDeleted) (event.Subscription, error) { + + logs, sub, err := _FunctionsCoordinator110.contract.WatchLogs(opts, "CommitmentDeleted") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(FunctionsCoordinator110CommitmentDeleted) + if err := _FunctionsCoordinator110.contract.UnpackLog(event, "CommitmentDeleted", 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 (_FunctionsCoordinator110 *FunctionsCoordinator110Filterer) ParseCommitmentDeleted(log types.Log) (*FunctionsCoordinator110CommitmentDeleted, error) { + event := new(FunctionsCoordinator110CommitmentDeleted) + if err := _FunctionsCoordinator110.contract.UnpackLog(event, "CommitmentDeleted", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type FunctionsCoordinator110ConfigSetIterator struct { + Event *FunctionsCoordinator110ConfigSet + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *FunctionsCoordinator110ConfigSetIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(FunctionsCoordinator110ConfigSet) + 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(FunctionsCoordinator110ConfigSet) + 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 *FunctionsCoordinator110ConfigSetIterator) Error() error { + return it.fail +} + +func (it *FunctionsCoordinator110ConfigSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type FunctionsCoordinator110ConfigSet struct { + PreviousConfigBlockNumber uint32 + ConfigDigest [32]byte + ConfigCount uint64 + Signers []common.Address + Transmitters []common.Address + F uint8 + OnchainConfig []byte + OffchainConfigVersion uint64 + OffchainConfig []byte + Raw types.Log +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110Filterer) FilterConfigSet(opts *bind.FilterOpts) (*FunctionsCoordinator110ConfigSetIterator, error) { + + logs, sub, err := _FunctionsCoordinator110.contract.FilterLogs(opts, "ConfigSet") + if err != nil { + return nil, err + } + return &FunctionsCoordinator110ConfigSetIterator{contract: _FunctionsCoordinator110.contract, event: "ConfigSet", logs: logs, sub: sub}, nil +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110Filterer) WatchConfigSet(opts *bind.WatchOpts, sink chan<- *FunctionsCoordinator110ConfigSet) (event.Subscription, error) { + + logs, sub, err := _FunctionsCoordinator110.contract.WatchLogs(opts, "ConfigSet") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(FunctionsCoordinator110ConfigSet) + if err := _FunctionsCoordinator110.contract.UnpackLog(event, "ConfigSet", 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 (_FunctionsCoordinator110 *FunctionsCoordinator110Filterer) ParseConfigSet(log types.Log) (*FunctionsCoordinator110ConfigSet, error) { + event := new(FunctionsCoordinator110ConfigSet) + if err := _FunctionsCoordinator110.contract.UnpackLog(event, "ConfigSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type FunctionsCoordinator110ConfigUpdatedIterator struct { + Event *FunctionsCoordinator110ConfigUpdated + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *FunctionsCoordinator110ConfigUpdatedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(FunctionsCoordinator110ConfigUpdated) + 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(FunctionsCoordinator110ConfigUpdated) + 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 *FunctionsCoordinator110ConfigUpdatedIterator) Error() error { + return it.fail +} + +func (it *FunctionsCoordinator110ConfigUpdatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type FunctionsCoordinator110ConfigUpdated struct { + Config FunctionsBillingConfig + Raw types.Log +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110Filterer) FilterConfigUpdated(opts *bind.FilterOpts) (*FunctionsCoordinator110ConfigUpdatedIterator, error) { + + logs, sub, err := _FunctionsCoordinator110.contract.FilterLogs(opts, "ConfigUpdated") + if err != nil { + return nil, err + } + return &FunctionsCoordinator110ConfigUpdatedIterator{contract: _FunctionsCoordinator110.contract, event: "ConfigUpdated", logs: logs, sub: sub}, nil +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110Filterer) WatchConfigUpdated(opts *bind.WatchOpts, sink chan<- *FunctionsCoordinator110ConfigUpdated) (event.Subscription, error) { + + logs, sub, err := _FunctionsCoordinator110.contract.WatchLogs(opts, "ConfigUpdated") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(FunctionsCoordinator110ConfigUpdated) + if err := _FunctionsCoordinator110.contract.UnpackLog(event, "ConfigUpdated", 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 (_FunctionsCoordinator110 *FunctionsCoordinator110Filterer) ParseConfigUpdated(log types.Log) (*FunctionsCoordinator110ConfigUpdated, error) { + event := new(FunctionsCoordinator110ConfigUpdated) + if err := _FunctionsCoordinator110.contract.UnpackLog(event, "ConfigUpdated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type FunctionsCoordinator110OracleRequestIterator struct { + Event *FunctionsCoordinator110OracleRequest + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *FunctionsCoordinator110OracleRequestIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(FunctionsCoordinator110OracleRequest) + 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(FunctionsCoordinator110OracleRequest) + 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 *FunctionsCoordinator110OracleRequestIterator) Error() error { + return it.fail +} + +func (it *FunctionsCoordinator110OracleRequestIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type FunctionsCoordinator110OracleRequest struct { + RequestId [32]byte + RequestingContract common.Address + RequestInitiator common.Address + SubscriptionId uint64 + SubscriptionOwner common.Address + Data []byte + DataVersion uint16 + Flags [32]byte + CallbackGasLimit uint64 + Commitment FunctionsResponseCommitment + Raw types.Log +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110Filterer) FilterOracleRequest(opts *bind.FilterOpts, requestId [][32]byte, requestingContract []common.Address) (*FunctionsCoordinator110OracleRequestIterator, error) { + + var requestIdRule []interface{} + for _, requestIdItem := range requestId { + requestIdRule = append(requestIdRule, requestIdItem) + } + var requestingContractRule []interface{} + for _, requestingContractItem := range requestingContract { + requestingContractRule = append(requestingContractRule, requestingContractItem) + } + + logs, sub, err := _FunctionsCoordinator110.contract.FilterLogs(opts, "OracleRequest", requestIdRule, requestingContractRule) + if err != nil { + return nil, err + } + return &FunctionsCoordinator110OracleRequestIterator{contract: _FunctionsCoordinator110.contract, event: "OracleRequest", logs: logs, sub: sub}, nil +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110Filterer) WatchOracleRequest(opts *bind.WatchOpts, sink chan<- *FunctionsCoordinator110OracleRequest, requestId [][32]byte, requestingContract []common.Address) (event.Subscription, error) { + + var requestIdRule []interface{} + for _, requestIdItem := range requestId { + requestIdRule = append(requestIdRule, requestIdItem) + } + var requestingContractRule []interface{} + for _, requestingContractItem := range requestingContract { + requestingContractRule = append(requestingContractRule, requestingContractItem) + } + + logs, sub, err := _FunctionsCoordinator110.contract.WatchLogs(opts, "OracleRequest", requestIdRule, requestingContractRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(FunctionsCoordinator110OracleRequest) + if err := _FunctionsCoordinator110.contract.UnpackLog(event, "OracleRequest", 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 (_FunctionsCoordinator110 *FunctionsCoordinator110Filterer) ParseOracleRequest(log types.Log) (*FunctionsCoordinator110OracleRequest, error) { + event := new(FunctionsCoordinator110OracleRequest) + if err := _FunctionsCoordinator110.contract.UnpackLog(event, "OracleRequest", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type FunctionsCoordinator110OracleResponseIterator struct { + Event *FunctionsCoordinator110OracleResponse + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *FunctionsCoordinator110OracleResponseIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(FunctionsCoordinator110OracleResponse) + 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(FunctionsCoordinator110OracleResponse) + 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 *FunctionsCoordinator110OracleResponseIterator) Error() error { + return it.fail +} + +func (it *FunctionsCoordinator110OracleResponseIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type FunctionsCoordinator110OracleResponse struct { + RequestId [32]byte + Transmitter common.Address + Raw types.Log +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110Filterer) FilterOracleResponse(opts *bind.FilterOpts, requestId [][32]byte) (*FunctionsCoordinator110OracleResponseIterator, error) { + + var requestIdRule []interface{} + for _, requestIdItem := range requestId { + requestIdRule = append(requestIdRule, requestIdItem) + } + + logs, sub, err := _FunctionsCoordinator110.contract.FilterLogs(opts, "OracleResponse", requestIdRule) + if err != nil { + return nil, err + } + return &FunctionsCoordinator110OracleResponseIterator{contract: _FunctionsCoordinator110.contract, event: "OracleResponse", logs: logs, sub: sub}, nil +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110Filterer) WatchOracleResponse(opts *bind.WatchOpts, sink chan<- *FunctionsCoordinator110OracleResponse, requestId [][32]byte) (event.Subscription, error) { + + var requestIdRule []interface{} + for _, requestIdItem := range requestId { + requestIdRule = append(requestIdRule, requestIdItem) + } + + logs, sub, err := _FunctionsCoordinator110.contract.WatchLogs(opts, "OracleResponse", requestIdRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(FunctionsCoordinator110OracleResponse) + if err := _FunctionsCoordinator110.contract.UnpackLog(event, "OracleResponse", 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 (_FunctionsCoordinator110 *FunctionsCoordinator110Filterer) ParseOracleResponse(log types.Log) (*FunctionsCoordinator110OracleResponse, error) { + event := new(FunctionsCoordinator110OracleResponse) + if err := _FunctionsCoordinator110.contract.UnpackLog(event, "OracleResponse", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type FunctionsCoordinator110OwnershipTransferRequestedIterator struct { + Event *FunctionsCoordinator110OwnershipTransferRequested + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *FunctionsCoordinator110OwnershipTransferRequestedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(FunctionsCoordinator110OwnershipTransferRequested) + 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(FunctionsCoordinator110OwnershipTransferRequested) + 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 *FunctionsCoordinator110OwnershipTransferRequestedIterator) Error() error { + return it.fail +} + +func (it *FunctionsCoordinator110OwnershipTransferRequestedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type FunctionsCoordinator110OwnershipTransferRequested struct { + From common.Address + To common.Address + Raw types.Log +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110Filterer) FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*FunctionsCoordinator110OwnershipTransferRequestedIterator, 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 := _FunctionsCoordinator110.contract.FilterLogs(opts, "OwnershipTransferRequested", fromRule, toRule) + if err != nil { + return nil, err + } + return &FunctionsCoordinator110OwnershipTransferRequestedIterator{contract: _FunctionsCoordinator110.contract, event: "OwnershipTransferRequested", logs: logs, sub: sub}, nil +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110Filterer) WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *FunctionsCoordinator110OwnershipTransferRequested, 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 := _FunctionsCoordinator110.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(FunctionsCoordinator110OwnershipTransferRequested) + if err := _FunctionsCoordinator110.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 (_FunctionsCoordinator110 *FunctionsCoordinator110Filterer) ParseOwnershipTransferRequested(log types.Log) (*FunctionsCoordinator110OwnershipTransferRequested, error) { + event := new(FunctionsCoordinator110OwnershipTransferRequested) + if err := _FunctionsCoordinator110.contract.UnpackLog(event, "OwnershipTransferRequested", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type FunctionsCoordinator110OwnershipTransferredIterator struct { + Event *FunctionsCoordinator110OwnershipTransferred + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *FunctionsCoordinator110OwnershipTransferredIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(FunctionsCoordinator110OwnershipTransferred) + 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(FunctionsCoordinator110OwnershipTransferred) + 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 *FunctionsCoordinator110OwnershipTransferredIterator) Error() error { + return it.fail +} + +func (it *FunctionsCoordinator110OwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type FunctionsCoordinator110OwnershipTransferred struct { + From common.Address + To common.Address + Raw types.Log +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110Filterer) FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*FunctionsCoordinator110OwnershipTransferredIterator, 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 := _FunctionsCoordinator110.contract.FilterLogs(opts, "OwnershipTransferred", fromRule, toRule) + if err != nil { + return nil, err + } + return &FunctionsCoordinator110OwnershipTransferredIterator{contract: _FunctionsCoordinator110.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110Filterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *FunctionsCoordinator110OwnershipTransferred, 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 := _FunctionsCoordinator110.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(FunctionsCoordinator110OwnershipTransferred) + if err := _FunctionsCoordinator110.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 (_FunctionsCoordinator110 *FunctionsCoordinator110Filterer) ParseOwnershipTransferred(log types.Log) (*FunctionsCoordinator110OwnershipTransferred, error) { + event := new(FunctionsCoordinator110OwnershipTransferred) + if err := _FunctionsCoordinator110.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type FunctionsCoordinator110RequestBilledIterator struct { + Event *FunctionsCoordinator110RequestBilled + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *FunctionsCoordinator110RequestBilledIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(FunctionsCoordinator110RequestBilled) + 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(FunctionsCoordinator110RequestBilled) + 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 *FunctionsCoordinator110RequestBilledIterator) Error() error { + return it.fail +} + +func (it *FunctionsCoordinator110RequestBilledIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type FunctionsCoordinator110RequestBilled struct { + RequestId [32]byte + JuelsPerGas *big.Int + L1FeeShareWei *big.Int + CallbackCostJuels *big.Int + TotalCostJuels *big.Int + Raw types.Log +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110Filterer) FilterRequestBilled(opts *bind.FilterOpts, requestId [][32]byte) (*FunctionsCoordinator110RequestBilledIterator, error) { + + var requestIdRule []interface{} + for _, requestIdItem := range requestId { + requestIdRule = append(requestIdRule, requestIdItem) + } + + logs, sub, err := _FunctionsCoordinator110.contract.FilterLogs(opts, "RequestBilled", requestIdRule) + if err != nil { + return nil, err + } + return &FunctionsCoordinator110RequestBilledIterator{contract: _FunctionsCoordinator110.contract, event: "RequestBilled", logs: logs, sub: sub}, nil +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110Filterer) WatchRequestBilled(opts *bind.WatchOpts, sink chan<- *FunctionsCoordinator110RequestBilled, requestId [][32]byte) (event.Subscription, error) { + + var requestIdRule []interface{} + for _, requestIdItem := range requestId { + requestIdRule = append(requestIdRule, requestIdItem) + } + + logs, sub, err := _FunctionsCoordinator110.contract.WatchLogs(opts, "RequestBilled", requestIdRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(FunctionsCoordinator110RequestBilled) + if err := _FunctionsCoordinator110.contract.UnpackLog(event, "RequestBilled", 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 (_FunctionsCoordinator110 *FunctionsCoordinator110Filterer) ParseRequestBilled(log types.Log) (*FunctionsCoordinator110RequestBilled, error) { + event := new(FunctionsCoordinator110RequestBilled) + if err := _FunctionsCoordinator110.contract.UnpackLog(event, "RequestBilled", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type FunctionsCoordinator110TransmittedIterator struct { + Event *FunctionsCoordinator110Transmitted + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *FunctionsCoordinator110TransmittedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(FunctionsCoordinator110Transmitted) + 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(FunctionsCoordinator110Transmitted) + 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 *FunctionsCoordinator110TransmittedIterator) Error() error { + return it.fail +} + +func (it *FunctionsCoordinator110TransmittedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type FunctionsCoordinator110Transmitted struct { + ConfigDigest [32]byte + Epoch uint32 + Raw types.Log +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110Filterer) FilterTransmitted(opts *bind.FilterOpts) (*FunctionsCoordinator110TransmittedIterator, error) { + + logs, sub, err := _FunctionsCoordinator110.contract.FilterLogs(opts, "Transmitted") + if err != nil { + return nil, err + } + return &FunctionsCoordinator110TransmittedIterator{contract: _FunctionsCoordinator110.contract, event: "Transmitted", logs: logs, sub: sub}, nil +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110Filterer) WatchTransmitted(opts *bind.WatchOpts, sink chan<- *FunctionsCoordinator110Transmitted) (event.Subscription, error) { + + logs, sub, err := _FunctionsCoordinator110.contract.WatchLogs(opts, "Transmitted") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(FunctionsCoordinator110Transmitted) + if err := _FunctionsCoordinator110.contract.UnpackLog(event, "Transmitted", 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 (_FunctionsCoordinator110 *FunctionsCoordinator110Filterer) ParseTransmitted(log types.Log) (*FunctionsCoordinator110Transmitted, error) { + event := new(FunctionsCoordinator110Transmitted) + if err := _FunctionsCoordinator110.contract.UnpackLog(event, "Transmitted", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type LatestConfigDetails struct { + ConfigCount uint32 + BlockNumber uint32 + ConfigDigest [32]byte +} +type LatestConfigDigestAndEpoch struct { + ScanLogs bool + ConfigDigest [32]byte + Epoch uint32 +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110) ParseLog(log types.Log) (generated.AbigenLog, error) { + switch log.Topics[0] { + case _FunctionsCoordinator110.abi.Events["CommitmentDeleted"].ID: + return _FunctionsCoordinator110.ParseCommitmentDeleted(log) + case _FunctionsCoordinator110.abi.Events["ConfigSet"].ID: + return _FunctionsCoordinator110.ParseConfigSet(log) + case _FunctionsCoordinator110.abi.Events["ConfigUpdated"].ID: + return _FunctionsCoordinator110.ParseConfigUpdated(log) + case _FunctionsCoordinator110.abi.Events["OracleRequest"].ID: + return _FunctionsCoordinator110.ParseOracleRequest(log) + case _FunctionsCoordinator110.abi.Events["OracleResponse"].ID: + return _FunctionsCoordinator110.ParseOracleResponse(log) + case _FunctionsCoordinator110.abi.Events["OwnershipTransferRequested"].ID: + return _FunctionsCoordinator110.ParseOwnershipTransferRequested(log) + case _FunctionsCoordinator110.abi.Events["OwnershipTransferred"].ID: + return _FunctionsCoordinator110.ParseOwnershipTransferred(log) + case _FunctionsCoordinator110.abi.Events["RequestBilled"].ID: + return _FunctionsCoordinator110.ParseRequestBilled(log) + case _FunctionsCoordinator110.abi.Events["Transmitted"].ID: + return _FunctionsCoordinator110.ParseTransmitted(log) + + default: + return nil, fmt.Errorf("abigen wrapper received unknown log topic: %v", log.Topics[0]) + } +} + +func (FunctionsCoordinator110CommitmentDeleted) Topic() common.Hash { + return common.HexToHash("0x8a4b97add3359bd6bcf5e82874363670eb5ad0f7615abddbd0ed0a3a98f0f416") +} + +func (FunctionsCoordinator110ConfigSet) Topic() common.Hash { + return common.HexToHash("0x1591690b8638f5fb2dbec82ac741805ac5da8b45dc5263f4875b0496fdce4e05") +} + +func (FunctionsCoordinator110ConfigUpdated) Topic() common.Hash { + return common.HexToHash("0x5f32d06f5e83eda3a68e0e964ef2e6af5cb613e8117aa103c2d6bca5f5184862") +} + +func (FunctionsCoordinator110OracleRequest) Topic() common.Hash { + return common.HexToHash("0xbf50768ccf13bd0110ca6d53a9c4f1f3271abdd4c24a56878863ed25b20598ff") +} + +func (FunctionsCoordinator110OracleResponse) Topic() common.Hash { + return common.HexToHash("0xc708e0440951fd63499c0f7a73819b469ee5dd3ecc356c0ab4eb7f18389009d9") +} + +func (FunctionsCoordinator110OwnershipTransferRequested) Topic() common.Hash { + return common.HexToHash("0xed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae1278") +} + +func (FunctionsCoordinator110OwnershipTransferred) Topic() common.Hash { + return common.HexToHash("0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0") +} + +func (FunctionsCoordinator110RequestBilled) Topic() common.Hash { + return common.HexToHash("0x90815c2e624694e8010bffad2bcefaf96af282ef1bc2ebc0042d1b89a585e046") +} + +func (FunctionsCoordinator110Transmitted) Topic() common.Hash { + return common.HexToHash("0xb04e63db38c49950639fa09d29872f21f5d49d614f3a969d8adf3d4b52e41a62") +} + +func (_FunctionsCoordinator110 *FunctionsCoordinator110) Address() common.Address { + return _FunctionsCoordinator110.address +} + +type FunctionsCoordinator110Interface interface { + EstimateCost(opts *bind.CallOpts, subscriptionId uint64, data []byte, callbackGasLimit uint32, gasPriceWei *big.Int) (*big.Int, error) + + GetAdminFee(opts *bind.CallOpts) (*big.Int, error) + + GetConfig(opts *bind.CallOpts) (FunctionsBillingConfig, error) + + GetDONFee(opts *bind.CallOpts, arg0 []byte) (*big.Int, error) + + GetDONPublicKey(opts *bind.CallOpts) ([]byte, error) + + GetThresholdPublicKey(opts *bind.CallOpts) ([]byte, error) + + GetWeiPerUnitLink(opts *bind.CallOpts) (*big.Int, error) + + LatestConfigDetails(opts *bind.CallOpts) (LatestConfigDetails, + + error) + + LatestConfigDigestAndEpoch(opts *bind.CallOpts) (LatestConfigDigestAndEpoch, + + error) + + Owner(opts *bind.CallOpts) (common.Address, error) + + Transmitters(opts *bind.CallOpts) ([]common.Address, error) + + TypeAndVersion(opts *bind.CallOpts) (string, error) + + AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) + + DeleteCommitment(opts *bind.TransactOpts, requestId [32]byte) (*types.Transaction, error) + + OracleWithdraw(opts *bind.TransactOpts, recipient common.Address, amount *big.Int) (*types.Transaction, error) + + OracleWithdrawAll(opts *bind.TransactOpts) (*types.Transaction, error) + + SetConfig(opts *bind.TransactOpts, _signers []common.Address, _transmitters []common.Address, _f uint8, _onchainConfig []byte, _offchainConfigVersion uint64, _offchainConfig []byte) (*types.Transaction, error) + + SetDONPublicKey(opts *bind.TransactOpts, donPublicKey []byte) (*types.Transaction, error) + + SetThresholdPublicKey(opts *bind.TransactOpts, thresholdPublicKey []byte) (*types.Transaction, error) + + StartRequest(opts *bind.TransactOpts, request FunctionsResponseRequestMeta) (*types.Transaction, error) + + TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) + + Transmit(opts *bind.TransactOpts, reportContext [3][32]byte, report []byte, rs [][32]byte, ss [][32]byte, rawVs [32]byte) (*types.Transaction, error) + + UpdateConfig(opts *bind.TransactOpts, config FunctionsBillingConfig) (*types.Transaction, error) + + FilterCommitmentDeleted(opts *bind.FilterOpts) (*FunctionsCoordinator110CommitmentDeletedIterator, error) + + WatchCommitmentDeleted(opts *bind.WatchOpts, sink chan<- *FunctionsCoordinator110CommitmentDeleted) (event.Subscription, error) + + ParseCommitmentDeleted(log types.Log) (*FunctionsCoordinator110CommitmentDeleted, error) + + FilterConfigSet(opts *bind.FilterOpts) (*FunctionsCoordinator110ConfigSetIterator, error) + + WatchConfigSet(opts *bind.WatchOpts, sink chan<- *FunctionsCoordinator110ConfigSet) (event.Subscription, error) + + ParseConfigSet(log types.Log) (*FunctionsCoordinator110ConfigSet, error) + + FilterConfigUpdated(opts *bind.FilterOpts) (*FunctionsCoordinator110ConfigUpdatedIterator, error) + + WatchConfigUpdated(opts *bind.WatchOpts, sink chan<- *FunctionsCoordinator110ConfigUpdated) (event.Subscription, error) + + ParseConfigUpdated(log types.Log) (*FunctionsCoordinator110ConfigUpdated, error) + + FilterOracleRequest(opts *bind.FilterOpts, requestId [][32]byte, requestingContract []common.Address) (*FunctionsCoordinator110OracleRequestIterator, error) + + WatchOracleRequest(opts *bind.WatchOpts, sink chan<- *FunctionsCoordinator110OracleRequest, requestId [][32]byte, requestingContract []common.Address) (event.Subscription, error) + + ParseOracleRequest(log types.Log) (*FunctionsCoordinator110OracleRequest, error) + + FilterOracleResponse(opts *bind.FilterOpts, requestId [][32]byte) (*FunctionsCoordinator110OracleResponseIterator, error) + + WatchOracleResponse(opts *bind.WatchOpts, sink chan<- *FunctionsCoordinator110OracleResponse, requestId [][32]byte) (event.Subscription, error) + + ParseOracleResponse(log types.Log) (*FunctionsCoordinator110OracleResponse, error) + + FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*FunctionsCoordinator110OwnershipTransferRequestedIterator, error) + + WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *FunctionsCoordinator110OwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) + + ParseOwnershipTransferRequested(log types.Log) (*FunctionsCoordinator110OwnershipTransferRequested, error) + + FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*FunctionsCoordinator110OwnershipTransferredIterator, error) + + WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *FunctionsCoordinator110OwnershipTransferred, from []common.Address, to []common.Address) (event.Subscription, error) + + ParseOwnershipTransferred(log types.Log) (*FunctionsCoordinator110OwnershipTransferred, error) + + FilterRequestBilled(opts *bind.FilterOpts, requestId [][32]byte) (*FunctionsCoordinator110RequestBilledIterator, error) + + WatchRequestBilled(opts *bind.WatchOpts, sink chan<- *FunctionsCoordinator110RequestBilled, requestId [][32]byte) (event.Subscription, error) + + ParseRequestBilled(log types.Log) (*FunctionsCoordinator110RequestBilled, error) + + FilterTransmitted(opts *bind.FilterOpts) (*FunctionsCoordinator110TransmittedIterator, error) + + WatchTransmitted(opts *bind.WatchOpts, sink chan<- *FunctionsCoordinator110Transmitted) (event.Subscription, error) + + ParseTransmitted(log types.Log) (*FunctionsCoordinator110Transmitted, error) + + ParseLog(log types.Log) (generated.AbigenLog, error) + + Address() common.Address +} diff --git a/core/gethwrappers/functions/generation/generated-wrapper-dependency-versions-do-not-edit.txt b/core/gethwrappers/functions/generation/generated-wrapper-dependency-versions-do-not-edit.txt index 102e377859c..3b8a032824a 100644 --- a/core/gethwrappers/functions/generation/generated-wrapper-dependency-versions-do-not-edit.txt +++ b/core/gethwrappers/functions/generation/generated-wrapper-dependency-versions-do-not-edit.txt @@ -4,7 +4,8 @@ functions_allow_list: ../../../contracts/solc/v0.8.19/functions/v1_X/TermsOfServ functions_billing_registry_events_mock: ../../../contracts/solc/v0.8.6/functions/v0_0_0/FunctionsBillingRegistryEventsMock.abi ../../../contracts/solc/v0.8.6/functions/v0_0_0/FunctionsBillingRegistryEventsMock.bin 50deeb883bd9c3729702be335c0388f9d8553bab4be5e26ecacac496a89e2b77 functions_client: ../../../contracts/solc/v0.8.19/functions/v1_X/FunctionsClient.abi ../../../contracts/solc/v0.8.19/functions/v1_X/FunctionsClient.bin 2368f537a04489c720a46733f8596c4fc88a31062ecfa966d05f25dd98608aca functions_client_example: ../../../contracts/solc/v0.8.19/functions/v1_X/FunctionsClientExample.abi ../../../contracts/solc/v0.8.19/functions/v1_X/FunctionsClientExample.bin abf32e69f268f40e8530eb8d8e96bf310b798a4c0049a58022d9d2fb527b601b -functions_coordinator: ../../../contracts/solc/v0.8.19/functions/v1_X/FunctionsCoordinator.abi ../../../contracts/solc/v0.8.19/functions/v1_X/FunctionsCoordinator.bin 9686bdf83a0ce09ad07e81f6af52889735ea5af5709ffd018bb7b75e5d284c5e +functions_coordinator: ../../../contracts/solc/v0.8.19/functions/v1_X/FunctionsCoordinator.abi ../../../contracts/solc/v0.8.19/functions/v1_X/FunctionsCoordinator.bin 87c95b1fd19ea664fbfae422a402b700c8da94eb47b06e676a25d1b159bfda63 +functions_coordinator_1_1_0: ../../../contracts/solc/v0.8.19/functions/v1_1_0/FunctionsCoordinator.abi ../../../contracts/solc/v0.8.19/functions/v1_1_0/FunctionsCoordinator.bin 88c2f899cfcb7b21530741b5446f3a32c92d8b457bfdd2a0160f51364b8d5d1a functions_load_test_client: ../../../contracts/solc/v0.8.19/functions/v1_X/FunctionsLoadTestClient.abi ../../../contracts/solc/v0.8.19/functions/v1_X/FunctionsLoadTestClient.bin c8dbbd5ebb34435800d6674700068837c3a252db60046a14b0e61e829db517de functions_oracle_events_mock: ../../../contracts/solc/v0.8.6/functions/v0_0_0/FunctionsOracleEventsMock.abi ../../../contracts/solc/v0.8.6/functions/v0_0_0/FunctionsOracleEventsMock.bin 3ca70f966f8fe751987f0ccb50bebb6aa5be77e4a9f835d1ae99e0e9bfb7d52c functions_router: ../../../contracts/solc/v0.8.19/functions/v1_X/FunctionsRouter.abi ../../../contracts/solc/v0.8.19/functions/v1_X/FunctionsRouter.bin 1f6d18f9e0846ad74b37a0a6acef5942ab73ace1e84307f201899f69e732e776 diff --git a/core/gethwrappers/functions/go_generate.go b/core/gethwrappers/functions/go_generate.go index 0538518da2d..622713bb23d 100644 --- a/core/gethwrappers/functions/go_generate.go +++ b/core/gethwrappers/functions/go_generate.go @@ -10,6 +10,7 @@ package gethwrappers //go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.19/functions/v1_X/FunctionsClientExample.abi ../../../contracts/solc/v0.8.19/functions/v1_X/FunctionsClientExample.bin FunctionsClientExample functions_client_example //go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.19/functions/v1_X/FunctionsLoadTestClient.abi ../../../contracts/solc/v0.8.19/functions/v1_X/FunctionsLoadTestClient.bin FunctionsLoadTestClient functions_load_test_client //go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.19/functions/v1_X/FunctionsCoordinator.abi ../../../contracts/solc/v0.8.19/functions/v1_X/FunctionsCoordinator.bin FunctionsCoordinator functions_coordinator +//go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.19/functions/v1_1_0/FunctionsCoordinator.abi ../../../contracts/solc/v0.8.19/functions/v1_1_0/FunctionsCoordinator.bin FunctionsCoordinator_1_1_0 functions_coordinator_1_1_0 //go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.19/functions/v1_X/FunctionsRouter.abi ../../../contracts/solc/v0.8.19/functions/v1_X/FunctionsRouter.bin FunctionsRouter functions_router //go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.19/functions/v1_X/TermsOfServiceAllowList.abi ../../../contracts/solc/v0.8.19/functions/v1_X/TermsOfServiceAllowList.bin TermsOfServiceAllowList functions_allow_list //go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.19/functions/v1_X/FunctionsV1EventsMock.abi ../../../contracts/solc/v0.8.19/functions/v1_X/FunctionsV1EventsMock.bin FunctionsV1EventsMock functions_v1_events_mock diff --git a/core/services/ocr2/plugins/functions/integration_tests/v1/internal/testutils.go b/core/services/ocr2/plugins/functions/integration_tests/v1/internal/testutils.go index 7f75717feba..9408a4a84f4 100644 --- a/core/services/ocr2/plugins/functions/integration_tests/v1/internal/testutils.go +++ b/core/services/ocr2/plugins/functions/integration_tests/v1/internal/testutils.go @@ -186,6 +186,10 @@ func StartNewChainWithContracts(t *testing.T, nClients int) (*bind.TransactOpts, linkEthFeedAddr, _, _, err := mock_v3_aggregator_contract.DeployMockV3AggregatorContract(owner, b, 18, big.NewInt(5_000_000_000_000_000)) require.NoError(t, err) + // Deploy mock LINK/USD price feed + linkUsdFeedAddr, _, _, err := mock_v3_aggregator_contract.DeployMockV3AggregatorContract(owner, b, 18, big.NewInt(1_500_00_000)) + require.NoError(t, err) + // Deploy Router contract handleOracleFulfillmentSelectorSlice, err := hex.DecodeString("0ca76175") require.NoError(t, err) @@ -227,11 +231,14 @@ func StartNewChainWithContracts(t *testing.T, nClients int) (*bind.TransactOpts, FulfillmentGasPriceOverEstimationBP: uint32(1_000), FallbackNativePerUnitLink: big.NewInt(5_000_000_000_000_000), MinimumEstimateGasPriceWei: big.NewInt(1_000_000_000), + OperationFee: big.NewInt(0), + FallbackUsdPerUnitLink: uint64(1_400_000_000), + FallbackUsdPerUnitLinkDecimals: uint8(8), } require.NoError(t, err) - coordinatorAddress, _, coordinatorContract, err := functions_coordinator.DeployFunctionsCoordinator(owner, b, routerAddress, coordinatorConfig, linkEthFeedAddr) + coordinatorAddress, _, coordinatorContract, err := functions_coordinator.DeployFunctionsCoordinator(owner, b, routerAddress, coordinatorConfig, linkEthFeedAddr, linkUsdFeedAddr) require.NoError(t, err) - proposalAddress, _, proposalContract, err := functions_coordinator.DeployFunctionsCoordinator(owner, b, routerAddress, coordinatorConfig, linkEthFeedAddr) + proposalAddress, _, proposalContract, err := functions_coordinator.DeployFunctionsCoordinator(owner, b, routerAddress, coordinatorConfig, linkEthFeedAddr, linkUsdFeedAddr) require.NoError(t, err) // Deploy Client contracts diff --git a/core/services/relay/evm/functions/logpoller_wrapper.go b/core/services/relay/evm/functions/logpoller_wrapper.go index f11b6bee1e0..192007a9d59 100644 --- a/core/services/relay/evm/functions/logpoller_wrapper.go +++ b/core/services/relay/evm/functions/logpoller_wrapper.go @@ -2,6 +2,7 @@ package functions import ( "context" + "strings" "sync" "time" @@ -15,6 +16,7 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/chains/evm/client" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/logpoller" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/functions/generated/functions_coordinator" + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/functions/generated/functions_coordinator_1_1_0" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/functions/generated/functions_router" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/functions/config" @@ -30,8 +32,8 @@ type logPollerWrapper struct { client client.Client logPoller logpoller.LogPoller subscribers map[string]evmRelayTypes.RouteUpdateSubscriber - activeCoordinator common.Address - proposedCoordinator common.Address + activeCoordinator coordinator + proposedCoordinator coordinator requestBlockOffset int64 responseBlockOffset int64 pastBlocksToPoll int64 @@ -54,6 +56,11 @@ type detectedEvents struct { detectedEventsOrdered []detectedEvent } +type coordinator struct { + address common.Address + typeAndVersion string +} + const logPollerCacheDurationSecDefault = 300 const pastBlocksToPollDefault = 50 const maxLogsToProcess = 1000 @@ -144,11 +151,11 @@ func (l *logPollerWrapper) Name() string { return l.lggr.Name() } // methods of LogPollerWrapper func (l *logPollerWrapper) LatestEvents() ([]evmRelayTypes.OracleRequest, []evmRelayTypes.OracleResponse, error) { l.mu.Lock() - coordinators := []common.Address{} - if l.activeCoordinator != (common.Address{}) { + coordinators := []coordinator{} + if l.activeCoordinator.address != (common.Address{}) { coordinators = append(coordinators, l.activeCoordinator) } - if l.proposedCoordinator != (common.Address{}) && l.activeCoordinator != l.proposedCoordinator { + if l.proposedCoordinator.address != (common.Address{}) && l.activeCoordinator != l.proposedCoordinator { coordinators = append(coordinators, l.proposedCoordinator) } latest, err := l.logPoller.LatestBlock() @@ -173,7 +180,12 @@ func (l *logPollerWrapper) LatestEvents() ([]evmRelayTypes.OracleRequest, []evmR for _, coordinator := range coordinators { requestEndBlock := latestBlockNum - l.requestBlockOffset - requestLogs, err := l.logPoller.Logs(startBlockNum, requestEndBlock, functions_coordinator.FunctionsCoordinatorOracleRequest{}.Topic(), coordinator) + requestLogTopic, err := oracleRequestLogTopic(coordinator) + if err != nil { + l.lggr.Errorw("LatestEvents: ", err) + return nil, nil, err + } + requestLogs, err := l.logPoller.Logs(startBlockNum, requestEndBlock, requestLogTopic, coordinator.address) if err != nil { l.lggr.Errorw("LatestEvents: fetching request logs from LogPoller failed", "startBlock", startBlockNum, "endBlock", requestEndBlock) return nil, nil, err @@ -181,7 +193,12 @@ func (l *logPollerWrapper) LatestEvents() ([]evmRelayTypes.OracleRequest, []evmR l.lggr.Debugw("LatestEvents: fetched request logs", "nRequestLogs", len(requestLogs), "latestBlock", latest, "startBlock", startBlockNum, "endBlock", requestEndBlock) requestLogs = l.filterPreviouslyDetectedEvents(requestLogs, &l.detectedRequests, "requests") responseEndBlock := latestBlockNum - l.responseBlockOffset - responseLogs, err := l.logPoller.Logs(startBlockNum, responseEndBlock, functions_coordinator.FunctionsCoordinatorOracleResponse{}.Topic(), coordinator) + responseLogTopic, err := oracleResponseLogTopic(coordinator) + if err != nil { + l.lggr.Errorw("LatestEvents: ", err) + return nil, nil, err + } + responseLogs, err := l.logPoller.Logs(startBlockNum, responseEndBlock, responseLogTopic, coordinator.address) if err != nil { l.lggr.Errorw("LatestEvents: fetching response logs from LogPoller failed", "startBlock", startBlockNum, "endBlock", responseEndBlock) return nil, nil, err @@ -189,91 +206,17 @@ func (l *logPollerWrapper) LatestEvents() ([]evmRelayTypes.OracleRequest, []evmR l.lggr.Debugw("LatestEvents: fetched request logs", "nResponseLogs", len(responseLogs), "latestBlock", latest, "startBlock", startBlockNum, "endBlock", responseEndBlock) responseLogs = l.filterPreviouslyDetectedEvents(responseLogs, &l.detectedResponses, "responses") - parsingContract, err := functions_coordinator.NewFunctionsCoordinator(coordinator, l.client) + l.lggr.Debugw("LatestEvents: parsing logs", "nRequestLogs", len(requestLogs), "nResponseLogs", len(responseLogs), "coordinatorAddress", coordinator.address.Hex()) + requests, err := l.logsToRequests(coordinator, requestLogs) if err != nil { - l.lggr.Error("LatestEvents: creating a contract instance for parsing failed") return nil, nil, err } - - l.lggr.Debugw("LatestEvents: parsing logs", "nRequestLogs", len(requestLogs), "nResponseLogs", len(responseLogs), "coordinatorAddress", coordinator.Hex()) - for _, log := range requestLogs { - gethLog := log.ToGethLog() - oracleRequest, err := parsingContract.ParseOracleRequest(gethLog) - if err != nil { - l.lggr.Errorw("LatestEvents: failed to parse a request log, skipping", "err", err) - continue - } - - uint32Type, errType1 := abi.NewType("uint32", "uint32", nil) - uint40Type, errType2 := abi.NewType("uint40", "uint40", nil) - uint64Type, errType3 := abi.NewType("uint64", "uint64", nil) - uint72Type, errType4 := abi.NewType("uint72", "uint72", nil) - uint96Type, errType5 := abi.NewType("uint96", "uint96", nil) - addressType, errType6 := abi.NewType("address", "address", nil) - bytes32Type, errType7 := abi.NewType("bytes32", "bytes32", nil) - - if errType1 != nil || errType2 != nil || errType3 != nil || errType4 != nil || errType5 != nil || errType6 != nil || errType7 != nil { - l.lggr.Errorw("LatestEvents: failed to initialize types", "errType1", errType1, - "errType2", errType2, "errType3", errType3, "errType4", errType4, "errType5", errType5, "errType6", errType6, "errType7", errType7, - ) - continue - } - commitmentABI := abi.Arguments{ - {Type: bytes32Type}, // RequestId - {Type: addressType}, // Coordinator - {Type: uint96Type}, // EstimatedTotalCostJuels - {Type: addressType}, // Client - {Type: uint64Type}, // SubscriptionId - {Type: uint32Type}, // CallbackGasLimit - {Type: uint72Type}, // AdminFee - {Type: uint72Type}, // DonFee - {Type: uint40Type}, // GasOverheadBeforeCallback - {Type: uint40Type}, // GasOverheadAfterCallback - {Type: uint32Type}, // TimeoutTimestamp - } - commitmentBytes, err := commitmentABI.Pack( - oracleRequest.Commitment.RequestId, - oracleRequest.Commitment.Coordinator, - oracleRequest.Commitment.EstimatedTotalCostJuels, - oracleRequest.Commitment.Client, - oracleRequest.Commitment.SubscriptionId, - oracleRequest.Commitment.CallbackGasLimit, - oracleRequest.Commitment.AdminFee, - oracleRequest.Commitment.DonFee, - oracleRequest.Commitment.GasOverheadBeforeCallback, - oracleRequest.Commitment.GasOverheadAfterCallback, - oracleRequest.Commitment.TimeoutTimestamp, - ) - if err != nil { - l.lggr.Errorw("LatestEvents: failed to pack commitment bytes, skipping", err) - } - - resultsReq = append(resultsReq, evmRelayTypes.OracleRequest{ - RequestId: oracleRequest.RequestId, - RequestingContract: oracleRequest.RequestingContract, - RequestInitiator: oracleRequest.RequestInitiator, - SubscriptionId: oracleRequest.SubscriptionId, - SubscriptionOwner: oracleRequest.SubscriptionOwner, - Data: oracleRequest.Data, - DataVersion: oracleRequest.DataVersion, - Flags: oracleRequest.Flags, - CallbackGasLimit: oracleRequest.CallbackGasLimit, - TxHash: oracleRequest.Raw.TxHash, - OnchainMetadata: commitmentBytes, - CoordinatorContract: coordinator, - }) - } - for _, log := range responseLogs { - gethLog := log.ToGethLog() - oracleResponse, err := parsingContract.ParseOracleResponse(gethLog) - if err != nil { - l.lggr.Errorw("LatestEvents: failed to parse a response log, skipping") - continue - } - resultsResp = append(resultsResp, evmRelayTypes.OracleResponse{ - RequestId: oracleResponse.RequestId, - }) + resultsReq = append(resultsReq, requests...) + responses, err := l.logsToResponses(coordinator, responseLogs) + if err != nil { + return nil, nil, err } + resultsResp = append(resultsResp, responses...) } l.lggr.Debugw("LatestEvents: done", "nRequestLogs", len(resultsReq), "nResponseLogs", len(resultsResp), "startBlock", startBlockNum, "endBlock", latestBlockNum) @@ -369,7 +312,7 @@ func (l *logPollerWrapper) getCurrentCoordinators(ctx context.Context) (common.A var donId [32]byte copy(donId[:], []byte(l.pluginConfig.DONID)) - activeCoordinator, err := l.routerContract.GetContractById(&bind.CallOpts{ + activeCoordinatorAddress, err := l.routerContract.GetContractById(&bind.CallOpts{ Pending: false, Context: ctx, }, donId) @@ -382,25 +325,59 @@ func (l *logPollerWrapper) getCurrentCoordinators(ctx context.Context) (common.A Context: ctx, }, donId) if err != nil { - return activeCoordinator, l.proposedCoordinator, nil + return activeCoordinatorAddress, l.proposedCoordinator.address, nil } - return activeCoordinator, proposedCoordinator, nil + return activeCoordinatorAddress, proposedCoordinator, nil } -func (l *logPollerWrapper) handleRouteUpdate(activeCoordinator common.Address, proposedCoordinator common.Address) { +func (l *logPollerWrapper) getCoordinatorTypeAndVersion(coordinatorAddress common.Address) (string, error) { + if coordinatorAddress == (common.Address{}) { + l.lggr.Debug("LogPollerWrapper: cannot get typeAndVersion from an unset address") + return "", nil + } + + coordinatorContract, err := functions_coordinator.NewFunctionsCoordinator(coordinatorAddress, l.client) + if err != nil { + l.lggr.Error("LogPollerWrapper: could not initialize Coordinator contract ", coordinatorAddress) + return "", err + } + + typeAndVersion, err := coordinatorContract.TypeAndVersion(&bind.CallOpts{}) + if err != nil { + l.lggr.Error("LogPollerWrapper: could not get typeAndVersion from Coordinator contract ", coordinatorAddress) + return "", err + } + + return typeAndVersion, nil +} + +func (l *logPollerWrapper) handleRouteUpdate(activeCoordinatorAddress common.Address, proposedCoordinatorAddress common.Address) { l.mu.Lock() defer l.mu.Unlock() - if activeCoordinator == (common.Address{}) { + if activeCoordinatorAddress == (common.Address{}) { l.lggr.Error("LogPollerWrapper: cannot update activeCoordinator to zero address") return } - if activeCoordinator == l.activeCoordinator && proposedCoordinator == l.proposedCoordinator { + if activeCoordinatorAddress == l.activeCoordinator.address && proposedCoordinatorAddress == l.proposedCoordinator.address { l.lggr.Debug("LogPollerWrapper: no changes to routes") return } + + activeCoordinatorTypeAndVersion, err := l.getCoordinatorTypeAndVersion(activeCoordinatorAddress) + if err != nil { + return + } + activeCoordinator := coordinator{address: activeCoordinatorAddress, typeAndVersion: activeCoordinatorTypeAndVersion} + + proposedCoordinatorTypeAndVersion, err := l.getCoordinatorTypeAndVersion(proposedCoordinatorAddress) + if err != nil { + return + } + proposedCoordinator := coordinator{address: proposedCoordinatorAddress, typeAndVersion: proposedCoordinatorTypeAndVersion} + errActive := l.registerFilters(activeCoordinator) errProposed := l.registerFilters(proposedCoordinator) if errActive != nil || errProposed != nil { @@ -408,33 +385,261 @@ func (l *logPollerWrapper) handleRouteUpdate(activeCoordinator common.Address, p return } - l.lggr.Debugw("LogPollerWrapper: new routes", "activeCoordinator", activeCoordinator.Hex(), "proposedCoordinator", proposedCoordinator.Hex()) + l.lggr.Debugw("LogPollerWrapper: new routes", "activeCoordinator", activeCoordinator.address.Hex(), "proposedCoordinator", proposedCoordinator.address.Hex()) l.activeCoordinator = activeCoordinator l.proposedCoordinator = proposedCoordinator for _, subscriber := range l.subscribers { - err := subscriber.UpdateRoutes(activeCoordinator, proposedCoordinator) + err := subscriber.UpdateRoutes(activeCoordinator.address, proposedCoordinator.address) if err != nil { l.lggr.Errorw("LogPollerWrapper: Failed to update routes", "err", err) } } } -func filterName(addr common.Address) string { - return logpoller.FilterName("FunctionsLogPollerWrapper", addr.String()) +func filterName(addr common.Address, version string) string { + return logpoller.FilterName("FunctionsLogPollerWrapper", addr.String(), "-v", version) } -func (l *logPollerWrapper) registerFilters(coordinatorAddress common.Address) error { - if (coordinatorAddress == common.Address{}) { +func (l *logPollerWrapper) registerFilters(coordinator coordinator) error { + if (coordinator.address == common.Address{}) { return nil } - return l.logPoller.RegisterFilter( - logpoller.Filter{ - Name: filterName(coordinatorAddress), - EventSigs: []common.Hash{ - functions_coordinator.FunctionsCoordinatorOracleRequest{}.Topic(), - functions_coordinator.FunctionsCoordinatorOracleResponse{}.Topic(), - }, - Addresses: []common.Address{coordinatorAddress}, - }) + + if strings.Contains(coordinator.typeAndVersion, "Functions Coordinator v1") { + return l.logPoller.RegisterFilter( + logpoller.Filter{ + Name: filterName(coordinator.address, "1"), + EventSigs: []common.Hash{ + functions_coordinator_1_1_0.FunctionsCoordinator110OracleRequest{}.Topic(), + functions_coordinator_1_1_0.FunctionsCoordinator110OracleResponse{}.Topic(), + }, + Addresses: []common.Address{coordinator.address}, + }) + } + + if strings.Contains(coordinator.typeAndVersion, "Functions Coordinator v2") { + return l.logPoller.RegisterFilter( + logpoller.Filter{ + Name: filterName(coordinator.address, "2"), + EventSigs: []common.Hash{ + functions_coordinator.FunctionsCoordinatorOracleRequest{}.Topic(), + functions_coordinator.FunctionsCoordinatorOracleResponse{}.Topic(), + }, + Addresses: []common.Address{coordinator.address}, + }) + } + + l.lggr.Errorw("RegisterFilters: Unsupported Coordinator version ", coordinator.typeAndVersion) + return errors.Errorf("RegisterFilters: Unsupported Coordinator version") +} + +func oracleRequestLogTopic(coordinator coordinator) (common.Hash, error) { + if strings.Contains(coordinator.typeAndVersion, "Functions Coordinator v1") { + return functions_coordinator_1_1_0.FunctionsCoordinator110OracleRequest{}.Topic(), nil + } + if strings.Contains(coordinator.typeAndVersion, "Functions Coordinator v2") { + return functions_coordinator.FunctionsCoordinatorOracleRequest{}.Topic(), nil + } + return common.Hash{}, errors.Errorf("OracleRequestLogTopic: Unsupported Coordinator version %s", coordinator.typeAndVersion) +} + +func oracleResponseLogTopic(coordinator coordinator) (common.Hash, error) { + if strings.Contains(coordinator.typeAndVersion, "Functions Coordinator v1") { + return functions_coordinator_1_1_0.FunctionsCoordinator110OracleResponse{}.Topic(), nil + } + if strings.Contains(coordinator.typeAndVersion, "Functions Coordinator v2") { + return functions_coordinator.FunctionsCoordinatorOracleResponse{}.Topic(), nil + } + return common.Hash{}, errors.Errorf("OracleResponseLogTopic: Unsupported Coordinator version %s", coordinator.typeAndVersion) +} + +func (l *logPollerWrapper) logsToRequests(coordinator coordinator, requestLogs []logpoller.Log) ([]evmRelayTypes.OracleRequest, error) { + var requests []evmRelayTypes.OracleRequest + + uint32Type, errType1 := abi.NewType("uint32", "uint32", nil) + uint40Type, errType2 := abi.NewType("uint40", "uint40", nil) + uint64Type, errType3 := abi.NewType("uint64", "uint64", nil) + uint72Type, errType4 := abi.NewType("uint72", "uint72", nil) + uint96Type, errType5 := abi.NewType("uint96", "uint96", nil) + addressType, errType6 := abi.NewType("address", "address", nil) + bytes32Type, errType7 := abi.NewType("bytes32", "bytes32", nil) + + if errType1 != nil || errType2 != nil || errType3 != nil || errType4 != nil || errType5 != nil || errType6 != nil || errType7 != nil { + l.lggr.Errorw("LogsToRequests: failed to initialize types", "errType1", errType1, + "errType2", errType2, "errType3", errType3, "errType4", errType4, "errType5", errType5, "errType6", errType6, "errType7", errType7, + ) + } + + if strings.Contains(coordinator.typeAndVersion, "Functions Coordinator v1") { + parsingContract, err := functions_coordinator_1_1_0.NewFunctionsCoordinator110(coordinator.address, l.client) + if err != nil { + return nil, errors.Errorf("LogsToRequests: creating a contract instance for parsing failed") + } + + for _, log := range requestLogs { + gethLog := log.ToGethLog() + oracleRequest, err := parsingContract.ParseOracleRequest(gethLog) + if err != nil { + l.lggr.Errorw("LogsToRequests: failed to parse a request log, skipping", "err", err) + continue + } + + commitmentABI := abi.Arguments{ + {Type: bytes32Type}, // RequestId + {Type: addressType}, // Coordinator + {Type: uint96Type}, // EstimatedTotalCostJuels + {Type: addressType}, // Client + {Type: uint64Type}, // SubscriptionId + {Type: uint32Type}, // CallbackGasLimit + {Type: uint72Type}, // AdminFee + {Type: uint72Type}, // DonFee + {Type: uint40Type}, // GasOverheadBeforeCallback + {Type: uint40Type}, // GasOverheadAfterCallback + {Type: uint32Type}, // TimeoutTimestamp + } + commitmentBytes, err := commitmentABI.Pack( + oracleRequest.Commitment.RequestId, + oracleRequest.Commitment.Coordinator, + oracleRequest.Commitment.EstimatedTotalCostJuels, + oracleRequest.Commitment.Client, + oracleRequest.Commitment.SubscriptionId, + oracleRequest.Commitment.CallbackGasLimit, + oracleRequest.Commitment.AdminFee, + oracleRequest.Commitment.DonFee, + oracleRequest.Commitment.GasOverheadBeforeCallback, + oracleRequest.Commitment.GasOverheadAfterCallback, + oracleRequest.Commitment.TimeoutTimestamp, + ) + if err != nil { + l.lggr.Errorw("LogsToRequests: failed to pack commitment bytes, skipping", err) + } + + requests = append(requests, evmRelayTypes.OracleRequest{ + RequestId: oracleRequest.RequestId, + RequestingContract: oracleRequest.RequestingContract, + RequestInitiator: oracleRequest.RequestInitiator, + SubscriptionId: oracleRequest.SubscriptionId, + SubscriptionOwner: oracleRequest.SubscriptionOwner, + Data: oracleRequest.Data, + DataVersion: oracleRequest.DataVersion, + Flags: oracleRequest.Flags, + CallbackGasLimit: oracleRequest.CallbackGasLimit, + TxHash: oracleRequest.Raw.TxHash, + OnchainMetadata: commitmentBytes, + CoordinatorContract: coordinator.address, + }) + } + return requests, nil + } + + if strings.Contains(coordinator.typeAndVersion, "Functions Coordinator v2") { + parsingContract, err := functions_coordinator.NewFunctionsCoordinator(coordinator.address, l.client) + if err != nil { + return nil, errors.Errorf("LogsToRequests: creating a contract instance for parsing failed") + } + + for _, log := range requestLogs { + gethLog := log.ToGethLog() + oracleRequest, err := parsingContract.ParseOracleRequest(gethLog) + if err != nil { + l.lggr.Errorw("LogsToRequests: failed to parse a request log, skipping", "err", err) + continue + } + + commitmentABI := abi.Arguments{ + {Type: bytes32Type}, // RequestId + {Type: addressType}, // Coordinator + {Type: uint96Type}, // EstimatedTotalCostJuels + {Type: addressType}, // Client + {Type: uint64Type}, // SubscriptionId + {Type: uint32Type}, // CallbackGasLimit + {Type: uint72Type}, // AdminFee + {Type: uint72Type}, // DonFee + {Type: uint40Type}, // GasOverheadBeforeCallback + {Type: uint40Type}, // GasOverheadAfterCallback + {Type: uint32Type}, // TimeoutTimestamp + {Type: uint72Type}, // OperationFee + } + commitmentBytes, err := commitmentABI.Pack( + oracleRequest.Commitment.RequestId, + oracleRequest.Commitment.Coordinator, + oracleRequest.Commitment.EstimatedTotalCostJuels, + oracleRequest.Commitment.Client, + oracleRequest.Commitment.SubscriptionId, + oracleRequest.Commitment.CallbackGasLimit, + oracleRequest.Commitment.AdminFee, + oracleRequest.Commitment.DonFee, + oracleRequest.Commitment.GasOverheadBeforeCallback, + oracleRequest.Commitment.GasOverheadAfterCallback, + oracleRequest.Commitment.TimeoutTimestamp, + oracleRequest.Commitment.OperationFee, + ) + if err != nil { + l.lggr.Errorw("LogsToRequests: failed to pack commitment bytes, skipping", err) + } + + requests = append(requests, evmRelayTypes.OracleRequest{ + RequestId: oracleRequest.RequestId, + RequestingContract: oracleRequest.RequestingContract, + RequestInitiator: oracleRequest.RequestInitiator, + SubscriptionId: oracleRequest.SubscriptionId, + SubscriptionOwner: oracleRequest.SubscriptionOwner, + Data: oracleRequest.Data, + DataVersion: oracleRequest.DataVersion, + Flags: oracleRequest.Flags, + CallbackGasLimit: oracleRequest.CallbackGasLimit, + TxHash: oracleRequest.Raw.TxHash, + OnchainMetadata: commitmentBytes, + CoordinatorContract: coordinator.address, + }) + } + return requests, nil + } + + return nil, errors.Errorf("LogsToRequests: Unsupported Coordinator version %s", coordinator.typeAndVersion) +} + +func (l *logPollerWrapper) logsToResponses(coordinator coordinator, responseLogs []logpoller.Log) ([]evmRelayTypes.OracleResponse, error) { + var responses []evmRelayTypes.OracleResponse + + if strings.Contains(coordinator.typeAndVersion, "Functions Coordinator v1") { + parsingContract, err := functions_coordinator_1_1_0.NewFunctionsCoordinator110(coordinator.address, l.client) + if err != nil { + return nil, errors.Errorf("LogsToResponses: creating a contract instance for parsing failed") + } + for _, log := range responseLogs { + gethLog := log.ToGethLog() + oracleResponse, err := parsingContract.ParseOracleResponse(gethLog) + if err != nil { + l.lggr.Errorw("LogsToResponses: failed to parse a response log, skipping") + continue + } + responses = append(responses, evmRelayTypes.OracleResponse{ + RequestId: oracleResponse.RequestId, + }) + } + return responses, nil + } + + if strings.Contains(coordinator.typeAndVersion, "Functions Coordinator v2") { + parsingContract, err := functions_coordinator.NewFunctionsCoordinator(coordinator.address, l.client) + if err != nil { + return nil, errors.Errorf("LogsToResponses: creating a contract instance for parsing failed") + } + for _, log := range responseLogs { + gethLog := log.ToGethLog() + oracleResponse, err := parsingContract.ParseOracleResponse(gethLog) + if err != nil { + l.lggr.Errorw("LogsToResponses: failed to parse a response log, skipping") + continue + } + responses = append(responses, evmRelayTypes.OracleResponse{ + RequestId: oracleResponse.RequestId, + }) + } + return responses, nil + } + + return nil, errors.Errorf("LogsToResponses: Unsupported Coordinator version %s", coordinator.typeAndVersion) } From 84a2675f5a4b0ce2fb1f828ac6eda68b6b638311 Mon Sep 17 00:00:00 2001 From: Justin Kaseman Date: Mon, 12 Feb 2024 12:19:05 -0800 Subject: [PATCH 02/19] (test): Update Fucntions Hardhat tests for USD premium fees --- .../test/v0.8/functions/v1/RouterBase.test.ts | 3 +++ contracts/test/v0.8/functions/v1/utils.ts | 21 ++++++++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/contracts/test/v0.8/functions/v1/RouterBase.test.ts b/contracts/test/v0.8/functions/v1/RouterBase.test.ts index 3a3b58b8f6b..92f9c7d320b 100644 --- a/contracts/test/v0.8/functions/v1/RouterBase.test.ts +++ b/contracts/test/v0.8/functions/v1/RouterBase.test.ts @@ -31,6 +31,7 @@ describe('FunctionsRouter - Base', () => { contracts.router.address, coordinatorConfig, contracts.mockLinkEth.address, + contracts.mockLinkUsd.address, ) const coordinator3 = await factories.functionsCoordinatorFactory .connect(roles.defaultAccount) @@ -38,6 +39,7 @@ describe('FunctionsRouter - Base', () => { contracts.router.address, coordinatorConfig, contracts.mockLinkEth.address, + contracts.mockLinkUsd.address, ) const coordinator4 = await factories.functionsCoordinatorFactory .connect(roles.defaultAccount) @@ -45,6 +47,7 @@ describe('FunctionsRouter - Base', () => { contracts.router.address, coordinatorConfig, contracts.mockLinkEth.address, + contracts.mockLinkUsd.address, ) await expect( diff --git a/contracts/test/v0.8/functions/v1/utils.ts b/contracts/test/v0.8/functions/v1/utils.ts index ffe5468f136..16954caed1e 100644 --- a/contracts/test/v0.8/functions/v1/utils.ts +++ b/contracts/test/v0.8/functions/v1/utils.ts @@ -26,6 +26,7 @@ export type FunctionsContracts = { client: Contract linkToken: Contract mockLinkEth: Contract + mockLinkUsd: Contract accessControl: Contract } @@ -99,6 +100,9 @@ export type CoordinatorConfig = { fulfillmentGasPriceOverEstimationBP: number fallbackNativePerUnitLink: BigNumber minimumEstimateGasPriceWei: number + operationFee: number + fallbackUsdPerUnitLink: number + fallbackUsdPerUnitLinkDecimals: number } const fallbackNativePerUnitLink = 5000000000000000 export const coordinatorConfig: CoordinatorConfig = { @@ -111,6 +115,9 @@ export const coordinatorConfig: CoordinatorConfig = { fulfillmentGasPriceOverEstimationBP: 0, fallbackNativePerUnitLink: BigNumber.from(fallbackNativePerUnitLink), minimumEstimateGasPriceWei: 1000000000, + operationFee: 0, + fallbackUsdPerUnitLink: 1500000000, + fallbackUsdPerUnitLinkDecimals: 8, } export const accessControlMockPublicKey = ethers.utils.getAddress( '0x32237412cC0321f56422d206e505dB4B3871AF5c', @@ -238,6 +245,7 @@ export function getSetupFactory(): () => { beforeEach(async () => { const linkEthRate = BigNumber.from(5021530000000000) + const linkUsdRate = BigNumber.from(1500000000) // Deploy const linkToken = await factories.linkTokenFactory @@ -249,13 +257,23 @@ export function getSetupFactory(): () => { linkEthRate, ) + const mockLinkUsd = await factories.mockAggregatorV3Factory.deploy( + 0, + linkUsdRate, + ) + const router = await factories.functionsRouterFactory .connect(roles.defaultAccount) .deploy(linkToken.address, functionsRouterConfig) const coordinator = await factories.functionsCoordinatorFactory .connect(roles.defaultAccount) - .deploy(router.address, coordinatorConfig, mockLinkEth.address) + .deploy( + router.address, + coordinatorConfig, + mockLinkEth.address, + mockLinkUsd.address, + ) const initialAllowedSenders: string[] = [] const initialBlockedSenders: string[] = [] @@ -290,6 +308,7 @@ export function getSetupFactory(): () => { router, linkToken, mockLinkEth, + mockLinkUsd, accessControl, } }) From 8aec7feadd1ff683e6b06b19dacf96c32371cbf2 Mon Sep 17 00:00:00 2001 From: Justin Kaseman Date: Thu, 15 Feb 2024 11:08:39 -0800 Subject: [PATCH 03/19] Soothe SonarQube. Set supported typeAndVersion to constants --- contracts/test/v0.8/functions/v1/utils.ts | 10 ++++---- .../relay/evm/functions/logpoller_wrapper.go | 23 +++++++++++-------- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/contracts/test/v0.8/functions/v1/utils.ts b/contracts/test/v0.8/functions/v1/utils.ts index 16954caed1e..053e4c2e9a9 100644 --- a/contracts/test/v0.8/functions/v1/utils.ts +++ b/contracts/test/v0.8/functions/v1/utils.ts @@ -119,6 +119,9 @@ export const coordinatorConfig: CoordinatorConfig = { fallbackUsdPerUnitLink: 1500000000, fallbackUsdPerUnitLinkDecimals: 8, } +const linkEthRate = '5021530000000000' +const linkUsdRate = '1500000000' + export const accessControlMockPublicKey = ethers.utils.getAddress( '0x32237412cC0321f56422d206e505dB4B3871AF5c', ) @@ -244,9 +247,6 @@ export function getSetupFactory(): () => { }) beforeEach(async () => { - const linkEthRate = BigNumber.from(5021530000000000) - const linkUsdRate = BigNumber.from(1500000000) - // Deploy const linkToken = await factories.linkTokenFactory .connect(roles.defaultAccount) @@ -254,12 +254,12 @@ export function getSetupFactory(): () => { const mockLinkEth = await factories.mockAggregatorV3Factory.deploy( 0, - linkEthRate, + BigNumber.from(linkEthRate), ) const mockLinkUsd = await factories.mockAggregatorV3Factory.deploy( 0, - linkUsdRate, + BigNumber.from(linkUsdRate), ) const router = await factories.functionsRouterFactory diff --git a/core/services/relay/evm/functions/logpoller_wrapper.go b/core/services/relay/evm/functions/logpoller_wrapper.go index 192007a9d59..5de0913c549 100644 --- a/core/services/relay/evm/functions/logpoller_wrapper.go +++ b/core/services/relay/evm/functions/logpoller_wrapper.go @@ -61,6 +61,9 @@ type coordinator struct { typeAndVersion string } +const FUNCTIONS_COORDINATOR_VERSION_1 = "Functions Coordinator v1" +const FUNCTIONS_COORDINATOR_VERSION_2 = "Functions Coordinator v2" + const logPollerCacheDurationSecDefault = 300 const pastBlocksToPollDefault = 50 const maxLogsToProcess = 1000 @@ -406,7 +409,7 @@ func (l *logPollerWrapper) registerFilters(coordinator coordinator) error { return nil } - if strings.Contains(coordinator.typeAndVersion, "Functions Coordinator v1") { + if strings.Contains(coordinator.typeAndVersion, FUNCTIONS_COORDINATOR_VERSION_1) { return l.logPoller.RegisterFilter( logpoller.Filter{ Name: filterName(coordinator.address, "1"), @@ -418,7 +421,7 @@ func (l *logPollerWrapper) registerFilters(coordinator coordinator) error { }) } - if strings.Contains(coordinator.typeAndVersion, "Functions Coordinator v2") { + if strings.Contains(coordinator.typeAndVersion, FUNCTIONS_COORDINATOR_VERSION_2) { return l.logPoller.RegisterFilter( logpoller.Filter{ Name: filterName(coordinator.address, "2"), @@ -435,20 +438,20 @@ func (l *logPollerWrapper) registerFilters(coordinator coordinator) error { } func oracleRequestLogTopic(coordinator coordinator) (common.Hash, error) { - if strings.Contains(coordinator.typeAndVersion, "Functions Coordinator v1") { + if strings.Contains(coordinator.typeAndVersion, FUNCTIONS_COORDINATOR_VERSION_1) { return functions_coordinator_1_1_0.FunctionsCoordinator110OracleRequest{}.Topic(), nil } - if strings.Contains(coordinator.typeAndVersion, "Functions Coordinator v2") { + if strings.Contains(coordinator.typeAndVersion, FUNCTIONS_COORDINATOR_VERSION_2) { return functions_coordinator.FunctionsCoordinatorOracleRequest{}.Topic(), nil } return common.Hash{}, errors.Errorf("OracleRequestLogTopic: Unsupported Coordinator version %s", coordinator.typeAndVersion) } func oracleResponseLogTopic(coordinator coordinator) (common.Hash, error) { - if strings.Contains(coordinator.typeAndVersion, "Functions Coordinator v1") { + if strings.Contains(coordinator.typeAndVersion, FUNCTIONS_COORDINATOR_VERSION_1) { return functions_coordinator_1_1_0.FunctionsCoordinator110OracleResponse{}.Topic(), nil } - if strings.Contains(coordinator.typeAndVersion, "Functions Coordinator v2") { + if strings.Contains(coordinator.typeAndVersion, FUNCTIONS_COORDINATOR_VERSION_2) { return functions_coordinator.FunctionsCoordinatorOracleResponse{}.Topic(), nil } return common.Hash{}, errors.Errorf("OracleResponseLogTopic: Unsupported Coordinator version %s", coordinator.typeAndVersion) @@ -471,7 +474,7 @@ func (l *logPollerWrapper) logsToRequests(coordinator coordinator, requestLogs [ ) } - if strings.Contains(coordinator.typeAndVersion, "Functions Coordinator v1") { + if strings.Contains(coordinator.typeAndVersion, FUNCTIONS_COORDINATOR_VERSION_1) { parsingContract, err := functions_coordinator_1_1_0.NewFunctionsCoordinator110(coordinator.address, l.client) if err != nil { return nil, errors.Errorf("LogsToRequests: creating a contract instance for parsing failed") @@ -533,7 +536,7 @@ func (l *logPollerWrapper) logsToRequests(coordinator coordinator, requestLogs [ return requests, nil } - if strings.Contains(coordinator.typeAndVersion, "Functions Coordinator v2") { + if strings.Contains(coordinator.typeAndVersion, FUNCTIONS_COORDINATOR_VERSION_2) { parsingContract, err := functions_coordinator.NewFunctionsCoordinator(coordinator.address, l.client) if err != nil { return nil, errors.Errorf("LogsToRequests: creating a contract instance for parsing failed") @@ -603,7 +606,7 @@ func (l *logPollerWrapper) logsToRequests(coordinator coordinator, requestLogs [ func (l *logPollerWrapper) logsToResponses(coordinator coordinator, responseLogs []logpoller.Log) ([]evmRelayTypes.OracleResponse, error) { var responses []evmRelayTypes.OracleResponse - if strings.Contains(coordinator.typeAndVersion, "Functions Coordinator v1") { + if strings.Contains(coordinator.typeAndVersion, FUNCTIONS_COORDINATOR_VERSION_1) { parsingContract, err := functions_coordinator_1_1_0.NewFunctionsCoordinator110(coordinator.address, l.client) if err != nil { return nil, errors.Errorf("LogsToResponses: creating a contract instance for parsing failed") @@ -622,7 +625,7 @@ func (l *logPollerWrapper) logsToResponses(coordinator coordinator, responseLogs return responses, nil } - if strings.Contains(coordinator.typeAndVersion, "Functions Coordinator v2") { + if strings.Contains(coordinator.typeAndVersion, FUNCTIONS_COORDINATOR_VERSION_2) { parsingContract, err := functions_coordinator.NewFunctionsCoordinator(coordinator.address, l.client) if err != nil { return nil, errors.Errorf("LogsToResponses: creating a contract instance for parsing failed") From 9e50fa9de9b119791c28379369a64a056269dfb8 Mon Sep 17 00:00:00 2001 From: Justin Kaseman Date: Thu, 15 Feb 2024 12:40:23 -0800 Subject: [PATCH 04/19] Remove more duplicated code: commitment ABI --- .../relay/evm/functions/logpoller_wrapper.go | 76 +++++++++---------- 1 file changed, 36 insertions(+), 40 deletions(-) diff --git a/core/services/relay/evm/functions/logpoller_wrapper.go b/core/services/relay/evm/functions/logpoller_wrapper.go index 5de0913c549..89bd39d3e52 100644 --- a/core/services/relay/evm/functions/logpoller_wrapper.go +++ b/core/services/relay/evm/functions/logpoller_wrapper.go @@ -61,8 +61,12 @@ type coordinator struct { typeAndVersion string } -const FUNCTIONS_COORDINATOR_VERSION_1 = "Functions Coordinator v1" -const FUNCTIONS_COORDINATOR_VERSION_2 = "Functions Coordinator v2" +const FUNCTIONS_COORDINATOR_VERSION_1_SUBSTRING = "Functions Coordinator v1" +const FUNCTIONS_COORDINATOR_VERSION_2_SUBSTRING = "Functions Coordinator v2" + +type Functions_Coordinator interface { + *functions_coordinator_1_1_0.FunctionsCoordinator110 | *functions_coordinator.FunctionsCoordinator +} const logPollerCacheDurationSecDefault = 300 const pastBlocksToPollDefault = 50 @@ -409,7 +413,7 @@ func (l *logPollerWrapper) registerFilters(coordinator coordinator) error { return nil } - if strings.Contains(coordinator.typeAndVersion, FUNCTIONS_COORDINATOR_VERSION_1) { + if strings.Contains(coordinator.typeAndVersion, FUNCTIONS_COORDINATOR_VERSION_1_SUBSTRING) { return l.logPoller.RegisterFilter( logpoller.Filter{ Name: filterName(coordinator.address, "1"), @@ -421,7 +425,7 @@ func (l *logPollerWrapper) registerFilters(coordinator coordinator) error { }) } - if strings.Contains(coordinator.typeAndVersion, FUNCTIONS_COORDINATOR_VERSION_2) { + if strings.Contains(coordinator.typeAndVersion, FUNCTIONS_COORDINATOR_VERSION_2_SUBSTRING) { return l.logPoller.RegisterFilter( logpoller.Filter{ Name: filterName(coordinator.address, "2"), @@ -438,20 +442,20 @@ func (l *logPollerWrapper) registerFilters(coordinator coordinator) error { } func oracleRequestLogTopic(coordinator coordinator) (common.Hash, error) { - if strings.Contains(coordinator.typeAndVersion, FUNCTIONS_COORDINATOR_VERSION_1) { + if strings.Contains(coordinator.typeAndVersion, FUNCTIONS_COORDINATOR_VERSION_1_SUBSTRING) { return functions_coordinator_1_1_0.FunctionsCoordinator110OracleRequest{}.Topic(), nil } - if strings.Contains(coordinator.typeAndVersion, FUNCTIONS_COORDINATOR_VERSION_2) { + if strings.Contains(coordinator.typeAndVersion, FUNCTIONS_COORDINATOR_VERSION_2_SUBSTRING) { return functions_coordinator.FunctionsCoordinatorOracleRequest{}.Topic(), nil } return common.Hash{}, errors.Errorf("OracleRequestLogTopic: Unsupported Coordinator version %s", coordinator.typeAndVersion) } func oracleResponseLogTopic(coordinator coordinator) (common.Hash, error) { - if strings.Contains(coordinator.typeAndVersion, FUNCTIONS_COORDINATOR_VERSION_1) { + if strings.Contains(coordinator.typeAndVersion, FUNCTIONS_COORDINATOR_VERSION_1_SUBSTRING) { return functions_coordinator_1_1_0.FunctionsCoordinator110OracleResponse{}.Topic(), nil } - if strings.Contains(coordinator.typeAndVersion, FUNCTIONS_COORDINATOR_VERSION_2) { + if strings.Contains(coordinator.typeAndVersion, FUNCTIONS_COORDINATOR_VERSION_2_SUBSTRING) { return functions_coordinator.FunctionsCoordinatorOracleResponse{}.Topic(), nil } return common.Hash{}, errors.Errorf("OracleResponseLogTopic: Unsupported Coordinator version %s", coordinator.typeAndVersion) @@ -474,10 +478,24 @@ func (l *logPollerWrapper) logsToRequests(coordinator coordinator, requestLogs [ ) } - if strings.Contains(coordinator.typeAndVersion, FUNCTIONS_COORDINATOR_VERSION_1) { + commitmentABI := abi.Arguments{ + {Type: bytes32Type}, // RequestId + {Type: addressType}, // Coordinator + {Type: uint96Type}, // EstimatedTotalCostJuels + {Type: addressType}, // Client + {Type: uint64Type}, // SubscriptionId + {Type: uint32Type}, // CallbackGasLimit + {Type: uint72Type}, // AdminFee + {Type: uint72Type}, // DonFee + {Type: uint40Type}, // GasOverheadBeforeCallback + {Type: uint40Type}, // GasOverheadAfterCallback + {Type: uint32Type}, // TimeoutTimestamp + } + + if strings.Contains(coordinator.typeAndVersion, FUNCTIONS_COORDINATOR_VERSION_1_SUBSTRING) { parsingContract, err := functions_coordinator_1_1_0.NewFunctionsCoordinator110(coordinator.address, l.client) if err != nil { - return nil, errors.Errorf("LogsToRequests: creating a contract instance for parsing failed") + return nil, errors.Errorf("LogsToRequests: creating a contract instance for NewFunctionsCoordinator110 parsing failed") } for _, log := range requestLogs { @@ -488,19 +506,6 @@ func (l *logPollerWrapper) logsToRequests(coordinator coordinator, requestLogs [ continue } - commitmentABI := abi.Arguments{ - {Type: bytes32Type}, // RequestId - {Type: addressType}, // Coordinator - {Type: uint96Type}, // EstimatedTotalCostJuels - {Type: addressType}, // Client - {Type: uint64Type}, // SubscriptionId - {Type: uint32Type}, // CallbackGasLimit - {Type: uint72Type}, // AdminFee - {Type: uint72Type}, // DonFee - {Type: uint40Type}, // GasOverheadBeforeCallback - {Type: uint40Type}, // GasOverheadAfterCallback - {Type: uint32Type}, // TimeoutTimestamp - } commitmentBytes, err := commitmentABI.Pack( oracleRequest.Commitment.RequestId, oracleRequest.Commitment.Coordinator, @@ -536,10 +541,10 @@ func (l *logPollerWrapper) logsToRequests(coordinator coordinator, requestLogs [ return requests, nil } - if strings.Contains(coordinator.typeAndVersion, FUNCTIONS_COORDINATOR_VERSION_2) { + if strings.Contains(coordinator.typeAndVersion, FUNCTIONS_COORDINATOR_VERSION_2_SUBSTRING) { parsingContract, err := functions_coordinator.NewFunctionsCoordinator(coordinator.address, l.client) if err != nil { - return nil, errors.Errorf("LogsToRequests: creating a contract instance for parsing failed") + return nil, errors.Errorf("LogsToRequests: creating a contract instance for NewFunctionsCoordinator parsing failed") } for _, log := range requestLogs { @@ -550,20 +555,11 @@ func (l *logPollerWrapper) logsToRequests(coordinator coordinator, requestLogs [ continue } - commitmentABI := abi.Arguments{ - {Type: bytes32Type}, // RequestId - {Type: addressType}, // Coordinator - {Type: uint96Type}, // EstimatedTotalCostJuels - {Type: addressType}, // Client - {Type: uint64Type}, // SubscriptionId - {Type: uint32Type}, // CallbackGasLimit - {Type: uint72Type}, // AdminFee - {Type: uint72Type}, // DonFee - {Type: uint40Type}, // GasOverheadBeforeCallback - {Type: uint40Type}, // GasOverheadAfterCallback - {Type: uint32Type}, // TimeoutTimestamp - {Type: uint72Type}, // OperationFee + addedFields := abi.Arguments{ + {Type: uint72Type}, } + commitmentABI = append(commitmentABI, addedFields...) + commitmentBytes, err := commitmentABI.Pack( oracleRequest.Commitment.RequestId, oracleRequest.Commitment.Coordinator, @@ -606,7 +602,7 @@ func (l *logPollerWrapper) logsToRequests(coordinator coordinator, requestLogs [ func (l *logPollerWrapper) logsToResponses(coordinator coordinator, responseLogs []logpoller.Log) ([]evmRelayTypes.OracleResponse, error) { var responses []evmRelayTypes.OracleResponse - if strings.Contains(coordinator.typeAndVersion, FUNCTIONS_COORDINATOR_VERSION_1) { + if strings.Contains(coordinator.typeAndVersion, FUNCTIONS_COORDINATOR_VERSION_1_SUBSTRING) { parsingContract, err := functions_coordinator_1_1_0.NewFunctionsCoordinator110(coordinator.address, l.client) if err != nil { return nil, errors.Errorf("LogsToResponses: creating a contract instance for parsing failed") @@ -625,7 +621,7 @@ func (l *logPollerWrapper) logsToResponses(coordinator coordinator, responseLogs return responses, nil } - if strings.Contains(coordinator.typeAndVersion, FUNCTIONS_COORDINATOR_VERSION_2) { + if strings.Contains(coordinator.typeAndVersion, FUNCTIONS_COORDINATOR_VERSION_2_SUBSTRING) { parsingContract, err := functions_coordinator.NewFunctionsCoordinator(coordinator.address, l.client) if err != nil { return nil, errors.Errorf("LogsToResponses: creating a contract instance for parsing failed") From 86321d6c567dae0677475cd829fef350c7a6bfc1 Mon Sep 17 00:00:00 2001 From: Justin Kaseman Date: Thu, 15 Feb 2024 13:28:15 -0800 Subject: [PATCH 05/19] Remove even more duplicated code: OracleRequest evmRelayType --- .../relay/evm/functions/logpoller_wrapper.go | 68 +++++++++++-------- 1 file changed, 41 insertions(+), 27 deletions(-) diff --git a/core/services/relay/evm/functions/logpoller_wrapper.go b/core/services/relay/evm/functions/logpoller_wrapper.go index 89bd39d3e52..b85412953cb 100644 --- a/core/services/relay/evm/functions/logpoller_wrapper.go +++ b/core/services/relay/evm/functions/logpoller_wrapper.go @@ -478,20 +478,6 @@ func (l *logPollerWrapper) logsToRequests(coordinator coordinator, requestLogs [ ) } - commitmentABI := abi.Arguments{ - {Type: bytes32Type}, // RequestId - {Type: addressType}, // Coordinator - {Type: uint96Type}, // EstimatedTotalCostJuels - {Type: addressType}, // Client - {Type: uint64Type}, // SubscriptionId - {Type: uint32Type}, // CallbackGasLimit - {Type: uint72Type}, // AdminFee - {Type: uint72Type}, // DonFee - {Type: uint40Type}, // GasOverheadBeforeCallback - {Type: uint40Type}, // GasOverheadAfterCallback - {Type: uint32Type}, // TimeoutTimestamp - } - if strings.Contains(coordinator.typeAndVersion, FUNCTIONS_COORDINATOR_VERSION_1_SUBSTRING) { parsingContract, err := functions_coordinator_1_1_0.NewFunctionsCoordinator110(coordinator.address, l.client) if err != nil { @@ -506,7 +492,21 @@ func (l *logPollerWrapper) logsToRequests(coordinator coordinator, requestLogs [ continue } - commitmentBytes, err := commitmentABI.Pack( + commitmentABIV1 := abi.Arguments{ + {Type: bytes32Type}, // RequestId + {Type: addressType}, // Coordinator + {Type: uint96Type}, // EstimatedTotalCostJuels + {Type: addressType}, // Client + {Type: uint64Type}, // SubscriptionId + {Type: uint32Type}, // CallbackGasLimit + {Type: uint72Type}, // AdminFee + {Type: uint72Type}, // DonFee + {Type: uint40Type}, // GasOverheadBeforeCallback + {Type: uint40Type}, // GasOverheadAfterCallback + {Type: uint32Type}, // TimeoutTimestamp + } + + commitmentBytesV1, err := commitmentABIV1.Pack( oracleRequest.Commitment.RequestId, oracleRequest.Commitment.Coordinator, oracleRequest.Commitment.EstimatedTotalCostJuels, @@ -520,10 +520,10 @@ func (l *logPollerWrapper) logsToRequests(coordinator coordinator, requestLogs [ oracleRequest.Commitment.TimeoutTimestamp, ) if err != nil { - l.lggr.Errorw("LogsToRequests: failed to pack commitment bytes, skipping", err) + l.lggr.Errorw("LogsToRequests: failed to pack Coordinator v1 commitment bytes, skipping", err) } - requests = append(requests, evmRelayTypes.OracleRequest{ + OracleRequestV1 := evmRelayTypes.OracleRequest{ RequestId: oracleRequest.RequestId, RequestingContract: oracleRequest.RequestingContract, RequestInitiator: oracleRequest.RequestInitiator, @@ -534,9 +534,11 @@ func (l *logPollerWrapper) logsToRequests(coordinator coordinator, requestLogs [ Flags: oracleRequest.Flags, CallbackGasLimit: oracleRequest.CallbackGasLimit, TxHash: oracleRequest.Raw.TxHash, - OnchainMetadata: commitmentBytes, + OnchainMetadata: commitmentBytesV1, CoordinatorContract: coordinator.address, - }) + } + + requests = append(requests, OracleRequestV1) } return requests, nil } @@ -555,12 +557,22 @@ func (l *logPollerWrapper) logsToRequests(coordinator coordinator, requestLogs [ continue } - addedFields := abi.Arguments{ - {Type: uint72Type}, + commitmentABIV2 := abi.Arguments{ + {Type: bytes32Type}, // RequestId + {Type: addressType}, // Coordinator + {Type: uint96Type}, // EstimatedTotalCostJuels + {Type: addressType}, // Client + {Type: uint64Type}, // SubscriptionId + {Type: uint32Type}, // CallbackGasLimit + {Type: uint72Type}, // AdminFee + {Type: uint72Type}, // DonFee + {Type: uint40Type}, // GasOverheadBeforeCallback + {Type: uint40Type}, // GasOverheadAfterCallback + {Type: uint32Type}, // TimeoutTimestamp + {Type: uint72Type}, // OperationFee } - commitmentABI = append(commitmentABI, addedFields...) - commitmentBytes, err := commitmentABI.Pack( + commitmentBytesV2, err := commitmentABIV2.Pack( oracleRequest.Commitment.RequestId, oracleRequest.Commitment.Coordinator, oracleRequest.Commitment.EstimatedTotalCostJuels, @@ -575,10 +587,10 @@ func (l *logPollerWrapper) logsToRequests(coordinator coordinator, requestLogs [ oracleRequest.Commitment.OperationFee, ) if err != nil { - l.lggr.Errorw("LogsToRequests: failed to pack commitment bytes, skipping", err) + l.lggr.Errorw("LogsToRequests: failed to pack Coordinator v2 commitment bytes, skipping", err) } - requests = append(requests, evmRelayTypes.OracleRequest{ + OracleRequestV2 := evmRelayTypes.OracleRequest{ RequestId: oracleRequest.RequestId, RequestingContract: oracleRequest.RequestingContract, RequestInitiator: oracleRequest.RequestInitiator, @@ -589,9 +601,11 @@ func (l *logPollerWrapper) logsToRequests(coordinator coordinator, requestLogs [ Flags: oracleRequest.Flags, CallbackGasLimit: oracleRequest.CallbackGasLimit, TxHash: oracleRequest.Raw.TxHash, - OnchainMetadata: commitmentBytes, + OnchainMetadata: commitmentBytesV2, CoordinatorContract: coordinator.address, - }) + } + + requests = append(requests, OracleRequestV2) } return requests, nil } From 97fea36559e8f04bc836ecb5e900c164e056cc66 Mon Sep 17 00:00:00 2001 From: Justin Kaseman Date: Thu, 15 Feb 2024 17:23:45 -0800 Subject: [PATCH 06/19] Changes from review --- .../gas-snapshots/functions.gas-snapshot | 116 +++++++++--------- .../functions/dev/v1_X/FunctionsBilling.sol | 34 +++-- .../dev/v1_X/FunctionsCoordinator.sol | 5 +- .../dev/v1_X/interfaces/IFunctionsBilling.sol | 10 +- .../dev/v1_X/libraries/FunctionsResponse.sol | 2 +- .../tests/v1_X/FunctionsBilling.t.sol | 1 + .../src/v0.8/functions/tests/v1_X/Setup.t.sol | 4 +- .../functions_coordinator.go | 20 +-- ...rapper-dependency-versions-do-not-edit.txt | 2 +- .../v1/internal/testutils.go | 4 +- 10 files changed, 97 insertions(+), 101 deletions(-) diff --git a/contracts/gas-snapshots/functions.gas-snapshot b/contracts/gas-snapshots/functions.gas-snapshot index c6fc3bca710..123a4b59688 100644 --- a/contracts/gas-snapshots/functions.gas-snapshot +++ b/contracts/gas-snapshots/functions.gas-snapshot @@ -1,71 +1,71 @@ -ChainSpecificUtil__getCurrentTxL1GasFees_Arbitrum:test__getCurrentTxL1GasFees_SuccessWhenArbitrumGoerli() (gas: 16276761) -ChainSpecificUtil__getCurrentTxL1GasFees_Arbitrum:test__getCurrentTxL1GasFees_SuccessWhenArbitrumMainnet() (gas: 16276739) -ChainSpecificUtil__getCurrentTxL1GasFees_Arbitrum:test__getCurrentTxL1GasFees_SuccessWhenArbitrumSepolia() (gas: 16276755) -ChainSpecificUtil__getCurrentTxL1GasFees_Base:test__getCurrentTxL1GasFees_SuccessWhenBaseGoerli() (gas: 16288311) -ChainSpecificUtil__getCurrentTxL1GasFees_Base:test__getCurrentTxL1GasFees_SuccessWhenBaseMainnet() (gas: 16288288) -ChainSpecificUtil__getCurrentTxL1GasFees_Base:test__getCurrentTxL1GasFees_SuccessWhenBaseSepolia() (gas: 16288260) -ChainSpecificUtil__getCurrentTxL1GasFees_Optimism:test__getCurrentTxL1GasFees_SuccessWhenOptimismGoerli() (gas: 16288211) -ChainSpecificUtil__getCurrentTxL1GasFees_Optimism:test__getCurrentTxL1GasFees_SuccessWhenOptimismMainnet() (gas: 16288200) -ChainSpecificUtil__getCurrentTxL1GasFees_Optimism:test__getCurrentTxL1GasFees_SuccessWhenOptimismSepolia() (gas: 16288244) +ChainSpecificUtil__getCurrentTxL1GasFees_Arbitrum:test__getCurrentTxL1GasFees_SuccessWhenArbitrumGoerli() (gas: 16036350) +ChainSpecificUtil__getCurrentTxL1GasFees_Arbitrum:test__getCurrentTxL1GasFees_SuccessWhenArbitrumMainnet() (gas: 16036328) +ChainSpecificUtil__getCurrentTxL1GasFees_Arbitrum:test__getCurrentTxL1GasFees_SuccessWhenArbitrumSepolia() (gas: 16036344) +ChainSpecificUtil__getCurrentTxL1GasFees_Base:test__getCurrentTxL1GasFees_SuccessWhenBaseGoerli() (gas: 16047934) +ChainSpecificUtil__getCurrentTxL1GasFees_Base:test__getCurrentTxL1GasFees_SuccessWhenBaseMainnet() (gas: 16047911) +ChainSpecificUtil__getCurrentTxL1GasFees_Base:test__getCurrentTxL1GasFees_SuccessWhenBaseSepolia() (gas: 16047883) +ChainSpecificUtil__getCurrentTxL1GasFees_Optimism:test__getCurrentTxL1GasFees_SuccessWhenOptimismGoerli() (gas: 16047834) +ChainSpecificUtil__getCurrentTxL1GasFees_Optimism:test__getCurrentTxL1GasFees_SuccessWhenOptimismMainnet() (gas: 16047823) +ChainSpecificUtil__getCurrentTxL1GasFees_Optimism:test__getCurrentTxL1GasFees_SuccessWhenOptimismSepolia() (gas: 16047867) FunctionsBilling_Constructor:test_Constructor_Success() (gas: 14823) FunctionsBilling_DeleteCommitment:test_DeleteCommitment_RevertIfNotRouter() (gas: 13282) FunctionsBilling_DeleteCommitment:test_DeleteCommitment_Success() (gas: 15897) -FunctionsBilling_EstimateCost:test_EstimateCost_RevertsIfGasPriceAboveCeiling() (gas: 32436) -FunctionsBilling_EstimateCost:test_EstimateCost_Success() (gas: 93245) -FunctionsBilling_EstimateCost:test_EstimateCost_SuccessLowGasPrice() (gas: 93348) +FunctionsBilling_EstimateCost:test_EstimateCost_RevertsIfGasPriceAboveCeiling() (gas: 32458) +FunctionsBilling_EstimateCost:test_EstimateCost_Success() (gas: 88265) +FunctionsBilling_EstimateCost:test_EstimateCost_SuccessLowGasPrice() (gas: 88368) FunctionsBilling_GetAdminFee:test_GetAdminFee_Success() (gas: 18292) -FunctionsBilling_GetConfig:test_GetConfig_Success() (gas: 27535) -FunctionsBilling_GetDONFee:test_GetDONFee_Success() (gas: 43496) -FunctionsBilling_GetOperationFee:test_GetOperationFee_Success() (gas: 42764) -FunctionsBilling_GetWeiPerUnitLink:test_GetWeiPerUnitLink_Success() (gas: 33951) +FunctionsBilling_GetConfig:test_GetConfig_Success() (gas: 27530) +FunctionsBilling_GetDONFee:test_GetDONFee_Success() (gas: 40876) +FunctionsBilling_GetOperationFee:test_GetOperationFee_Success() (gas: 40166) +FunctionsBilling_GetWeiPerUnitLink:test_GetWeiPerUnitLink_Success() (gas: 29391) FunctionsBilling_OracleWithdraw:test_OracleWithdraw_RevertIfInsufficientBalance() (gas: 70084) FunctionsBilling_OracleWithdraw:test_OracleWithdraw_RevertWithNoBalance() (gas: 106241) -FunctionsBilling_OracleWithdraw:test_OracleWithdraw_SuccessCoordinatorOwner() (gas: 132161) -FunctionsBilling_OracleWithdraw:test_OracleWithdraw_SuccessTransmitterWithBalanceNoAmountGiven() (gas: 172480) +FunctionsBilling_OracleWithdraw:test_OracleWithdraw_SuccessCoordinatorOwner() (gas: 129563) +FunctionsBilling_OracleWithdraw:test_OracleWithdraw_SuccessTransmitterWithBalanceNoAmountGiven() (gas: 169262) FunctionsBilling_OracleWithdraw:test_OracleWithdraw_SuccessTransmitterWithBalanceValidAmountGiven() (gas: 142453) FunctionsBilling_OracleWithdrawAll:test_OracleWithdrawAll_RevertIfNotOwner() (gas: 13319) -FunctionsBilling_OracleWithdrawAll:test_OracleWithdrawAll_SuccessPaysTransmittersWithBalance() (gas: 220452) -FunctionsBilling_UpdateConfig:test_UpdateConfig_RevertIfNotOwner() (gas: 21599) -FunctionsBilling_UpdateConfig:test_UpdateConfig_Success() (gas: 48669) +FunctionsBilling_OracleWithdrawAll:test_OracleWithdrawAll_SuccessPaysTransmittersWithBalance() (gas: 217234) +FunctionsBilling_UpdateConfig:test_UpdateConfig_RevertIfNotOwner() (gas: 21543) +FunctionsBilling_UpdateConfig:test_UpdateConfig_Success() (gas: 48597) FunctionsBilling__DisperseFeePool:test__DisperseFeePool_RevertIfNotSet() (gas: 8832) FunctionsBilling__FulfillAndBill:test__FulfillAndBill_RevertIfInvalidCommitment() (gas: 13332) -FunctionsBilling__FulfillAndBill:test__FulfillAndBill_Success() (gas: 212619) -FunctionsBilling__StartBilling:test__FulfillAndBill_HasUniqueGlobalRequestId() (gas: 546388) +FunctionsBilling__FulfillAndBill:test__FulfillAndBill_Success() (gas: 208271) +FunctionsBilling__StartBilling:test__FulfillAndBill_HasUniqueGlobalRequestId() (gas: 544189) FunctionsClient_Constructor:test_Constructor_Success() (gas: 7573) FunctionsClient_HandleOracleFulfillment:test_HandleOracleFulfillment_RevertIfNotRouter() (gas: 14617) FunctionsClient_HandleOracleFulfillment:test_HandleOracleFulfillment_Success() (gas: 22917) FunctionsClient__SendRequest:test__SendRequest_RevertIfInvalidCallbackGasLimit() (gas: 55059) FunctionsCoordinator_Constructor:test_Constructor_Success() (gas: 12029) -FunctionsCoordinator_GetDONPublicKey:test_GetDONPublicKey_RevertIfEmpty() (gas: 15378) -FunctionsCoordinator_GetDONPublicKey:test_GetDONPublicKey_Success() (gas: 106528) +FunctionsCoordinator_GetDONPublicKey:test_GetDONPublicKey_RevertIfEmpty() (gas: 15334) +FunctionsCoordinator_GetDONPublicKey:test_GetDONPublicKey_Success() (gas: 106484) FunctionsCoordinator_GetThresholdPublicKey:test_GetThresholdPublicKey_RevertIfEmpty() (gas: 15378) FunctionsCoordinator_GetThresholdPublicKey:test_GetThresholdPublicKey_Success() (gas: 656427) FunctionsCoordinator_SetDONPublicKey:test_SetDONPublicKey_RevertNotOwner() (gas: 20342) -FunctionsCoordinator_SetDONPublicKey:test_SetDONPublicKey_Success() (gas: 101307) +FunctionsCoordinator_SetDONPublicKey:test_SetDONPublicKey_Success() (gas: 101263) FunctionsCoordinator_SetThresholdPublicKey:test_SetThresholdPublicKey_RevertNotOwner() (gas: 13892) FunctionsCoordinator_SetThresholdPublicKey:test_SetThresholdPublicKey_Success() (gas: 651119) FunctionsCoordinator_StartRequest:test_StartRequest_RevertIfNotRouter() (gas: 22726) -FunctionsCoordinator_StartRequest:test_StartRequest_Success() (gas: 156374) -FunctionsCoordinator__IsTransmitter:test__IsTransmitter_SuccessFound() (gas: 18980) -FunctionsCoordinator__IsTransmitter:test__IsTransmitter_SuccessNotFound() (gas: 19713) +FunctionsCoordinator_StartRequest:test_StartRequest_Success() (gas: 151198) +FunctionsCoordinator__IsTransmitter:test__IsTransmitter_SuccessFound() (gas: 12275) +FunctionsCoordinator__IsTransmitter:test__IsTransmitter_SuccessNotFound() (gas: 20107) FunctionsRequest_DEFAULT_BUFFER_SIZE:test_DEFAULT_BUFFER_SIZE() (gas: 246) FunctionsRequest_EncodeCBOR:test_EncodeCBOR_Success() (gas: 223) FunctionsRequest_REQUEST_DATA_VERSION:test_REQUEST_DATA_VERSION() (gas: 225) FunctionsRouter_Constructor:test_Constructor_Success() (gas: 12007) -FunctionsRouter_Fulfill:test_Fulfill_RequestNotProcessedCostExceedsCommitment() (gas: 180658) -FunctionsRouter_Fulfill:test_Fulfill_RequestNotProcessedInsufficientGas() (gas: 171131) +FunctionsRouter_Fulfill:test_Fulfill_RequestNotProcessedCostExceedsCommitment() (gas: 175519) +FunctionsRouter_Fulfill:test_Fulfill_RequestNotProcessedInsufficientGas() (gas: 165992) FunctionsRouter_Fulfill:test_Fulfill_RequestNotProcessedInvalidCommitment() (gas: 38115) FunctionsRouter_Fulfill:test_Fulfill_RequestNotProcessedInvalidRequestId() (gas: 35238) -FunctionsRouter_Fulfill:test_Fulfill_RequestNotProcessedSubscriptionBalanceInvariant() (gas: 189134) +FunctionsRouter_Fulfill:test_Fulfill_RequestNotProcessedSubscriptionBalanceInvariant() (gas: 183995) FunctionsRouter_Fulfill:test_Fulfill_RevertIfNotCommittedCoordinator() (gas: 28086) -FunctionsRouter_Fulfill:test_Fulfill_RevertIfPaused() (gas: 164696) -FunctionsRouter_Fulfill:test_Fulfill_SuccessClientNoLongerExists() (gas: 362339) -FunctionsRouter_Fulfill:test_Fulfill_SuccessFulfilled() (gas: 375963) -FunctionsRouter_Fulfill:test_Fulfill_SuccessUserCallbackReverts() (gas: 2675587) -FunctionsRouter_Fulfill:test_Fulfill_SuccessUserCallbackRunsOutOfGas() (gas: 706537) -FunctionsRouter_GetAdminFee:test_GetAdminFee_Success() (gas: 20072) +FunctionsRouter_Fulfill:test_Fulfill_RevertIfPaused() (gas: 159557) +FunctionsRouter_Fulfill:test_Fulfill_SuccessClientNoLongerExists() (gas: 357982) +FunctionsRouter_Fulfill:test_Fulfill_SuccessFulfilled() (gas: 371606) +FunctionsRouter_Fulfill:test_Fulfill_SuccessUserCallbackReverts() (gas: 2671031) +FunctionsRouter_Fulfill:test_Fulfill_SuccessUserCallbackRunsOutOfGas() (gas: 701981) +FunctionsRouter_GetAdminFee:test_GetAdminFee_Success() (gas: 17983) FunctionsRouter_GetAllowListId:test_GetAllowListId_Success() (gas: 12904) -FunctionsRouter_GetConfig:test_GetConfig_Success() (gas: 39960) +FunctionsRouter_GetConfig:test_GetConfig_Success() (gas: 37159) FunctionsRouter_GetContractById:test_GetContractById_RevertIfRouteDoesNotExist() (gas: 13849) FunctionsRouter_GetContractById:test_GetContractById_SuccessIfRouteExists() (gas: 17373) FunctionsRouter_GetProposedContractById:test_GetProposedContractById_RevertIfRouteDoesNotExist() (gas: 16383) @@ -83,15 +83,15 @@ FunctionsRouter_ProposeContractsUpdate:test_ProposeContractsUpdate_RevertIfNotNe FunctionsRouter_ProposeContractsUpdate:test_ProposeContractsUpdate_RevertIfNotOwner() (gas: 23392) FunctionsRouter_ProposeContractsUpdate:test_ProposeContractsUpdate_Success() (gas: 118479) FunctionsRouter_SendRequest:test_SendRequest_RevertIfConsumerNotAllowed() (gas: 59391) -FunctionsRouter_SendRequest:test_SendRequest_RevertIfDuplicateRequestId() (gas: 220544) +FunctionsRouter_SendRequest:test_SendRequest_RevertIfDuplicateRequestId() (gas: 218342) FunctionsRouter_SendRequest:test_SendRequest_RevertIfEmptyData() (gas: 29426) FunctionsRouter_SendRequest:test_SendRequest_RevertIfIncorrectDonId() (gas: 57904) -FunctionsRouter_SendRequest:test_SendRequest_RevertIfInsufficientSubscriptionBalance() (gas: 212929) +FunctionsRouter_SendRequest:test_SendRequest_RevertIfInsufficientSubscriptionBalance() (gas: 208515) FunctionsRouter_SendRequest:test_SendRequest_RevertIfInvalidCallbackGasLimit() (gas: 50947) FunctionsRouter_SendRequest:test_SendRequest_RevertIfInvalidDonId() (gas: 25082) FunctionsRouter_SendRequest:test_SendRequest_RevertIfNoSubscription() (gas: 29132) FunctionsRouter_SendRequest:test_SendRequest_RevertIfPaused() (gas: 34291) -FunctionsRouter_SendRequest:test_SendRequest_Success() (gas: 322092) +FunctionsRouter_SendRequest:test_SendRequest_Success() (gas: 318131) FunctionsRouter_SendRequestToProposed:test_SendRequestToProposed_RevertIfConsumerNotAllowed() (gas: 65887) FunctionsRouter_SendRequestToProposed:test_SendRequestToProposed_RevertIfEmptyData() (gas: 36012) FunctionsRouter_SendRequestToProposed:test_SendRequestToProposed_RevertIfIncorrectDonId() (gas: 29896) @@ -99,8 +99,8 @@ FunctionsRouter_SendRequestToProposed:test_SendRequestToProposed_RevertIfInvalid FunctionsRouter_SendRequestToProposed:test_SendRequestToProposed_RevertIfInvalidDonId() (gas: 27503) FunctionsRouter_SendRequestToProposed:test_SendRequestToProposed_RevertIfNoSubscription() (gas: 35717) FunctionsRouter_SendRequestToProposed:test_SendRequestToProposed_RevertIfPaused() (gas: 40810) -FunctionsRouter_SendRequestToProposed:test_SendRequestToProposed_Success() (gas: 328539) -FunctionsRouter_SendRequestToProposed:test_SendRequest_RevertIfInsufficientSubscriptionBalance() (gas: 219376) +FunctionsRouter_SendRequestToProposed:test_SendRequestToProposed_Success() (gas: 324578) +FunctionsRouter_SendRequestToProposed:test_SendRequest_RevertIfInsufficientSubscriptionBalance() (gas: 214962) FunctionsRouter_SetAllowListId:test_SetAllowListId_Success() (gas: 30688) FunctionsRouter_SetAllowListId:test_UpdateConfig_RevertIfNotOwner() (gas: 13403) FunctionsRouter_Unpause:test_Unpause_RevertIfNotOwner() (gas: 13293) @@ -113,9 +113,9 @@ FunctionsSubscriptions_AcceptSubscriptionOwnerTransfer:test_AcceptSubscriptionOw FunctionsSubscriptions_AcceptSubscriptionOwnerTransfer:test_AcceptSubscriptionOwnerTransfer_RevertIfPaused() (gas: 61031) FunctionsSubscriptions_AcceptSubscriptionOwnerTransfer:test_AcceptSubscriptionOwnerTransfer_RevertIfSenderBecomesBlocked() (gas: 139404) FunctionsSubscriptions_AcceptSubscriptionOwnerTransfer:test_AcceptSubscriptionOwnerTransfer_RevertIfSenderIsNotNewOwner() (gas: 62781) -FunctionsSubscriptions_AcceptSubscriptionOwnerTransfer:test_AcceptSubscriptionOwnerTransfer_Success() (gas: 241969) +FunctionsSubscriptions_AcceptSubscriptionOwnerTransfer:test_AcceptSubscriptionOwnerTransfer_Success() (gas: 239770) FunctionsSubscriptions_AddConsumer:test_AddConsumer_RevertIfMaximumConsumers() (gas: 138025) -FunctionsSubscriptions_AddConsumer:test_AddConsumer_RevertIfMaximumConsumersAfterConfigUpdate() (gas: 167058) +FunctionsSubscriptions_AddConsumer:test_AddConsumer_RevertIfMaximumConsumersAfterConfigUpdate() (gas: 164969) FunctionsSubscriptions_AddConsumer:test_AddConsumer_RevertIfNoSubscription() (gas: 12946) FunctionsSubscriptions_AddConsumer:test_AddConsumer_RevertIfNotAllowedSender() (gas: 102448) FunctionsSubscriptions_AddConsumer:test_AddConsumer_RevertIfNotSubscriptionOwner() (gas: 87199) @@ -125,9 +125,9 @@ FunctionsSubscriptions_CancelSubscription:test_CancelSubscription_RevertIfNoSubs FunctionsSubscriptions_CancelSubscription:test_CancelSubscription_RevertIfNotAllowedSender() (gas: 102524) FunctionsSubscriptions_CancelSubscription:test_CancelSubscription_RevertIfNotSubscriptionOwner() (gas: 89309) FunctionsSubscriptions_CancelSubscription:test_CancelSubscription_RevertIfPaused() (gas: 20148) -FunctionsSubscriptions_CancelSubscription:test_CancelSubscription_RevertIfPendingRequests() (gas: 221053) -FunctionsSubscriptions_CancelSubscription:test_CancelSubscription_SuccessForfeitAllBalanceAsDeposit() (gas: 114532) -FunctionsSubscriptions_CancelSubscription:test_CancelSubscription_SuccessForfeitSomeBalanceAsDeposit() (gas: 125845) +FunctionsSubscriptions_CancelSubscription:test_CancelSubscription_RevertIfPendingRequests() (gas: 218854) +FunctionsSubscriptions_CancelSubscription:test_CancelSubscription_SuccessForfeitAllBalanceAsDeposit() (gas: 114541) +FunctionsSubscriptions_CancelSubscription:test_CancelSubscription_SuccessForfeitSomeBalanceAsDeposit() (gas: 125867) FunctionsSubscriptions_CancelSubscription_ReceiveDeposit:test_CancelSubscription_SuccessRecieveDeposit() (gas: 75017) FunctionsSubscriptions_Constructor:test_Constructor_Success() (gas: 7654) FunctionsSubscriptions_CreateSubscriptionWithConsumer:test_CreateSubscriptionWithConsumer_RevertIfNotAllowedSender() (gas: 28704) @@ -158,7 +158,7 @@ FunctionsSubscriptions_OwnerCancelSubscription:test_OwnerCancelSubscription_Reve FunctionsSubscriptions_OwnerCancelSubscription:test_OwnerCancelSubscription_Success() (gas: 54867) FunctionsSubscriptions_OwnerCancelSubscription:test_OwnerCancelSubscription_SuccessDeletesSubscription() (gas: 49607) FunctionsSubscriptions_OwnerCancelSubscription:test_OwnerCancelSubscription_SuccessSubOwnerRefunded() (gas: 50896) -FunctionsSubscriptions_OwnerCancelSubscription:test_OwnerCancelSubscription_SuccessWhenRequestInFlight() (gas: 189257) +FunctionsSubscriptions_OwnerCancelSubscription:test_OwnerCancelSubscription_SuccessWhenRequestInFlight() (gas: 187058) FunctionsSubscriptions_OwnerWithdraw:test_OwnerWithdraw_RevertIfAmountMoreThanBalance() (gas: 17924) FunctionsSubscriptions_OwnerWithdraw:test_OwnerWithdraw_RevertIfBalanceInvariant() (gas: 210) FunctionsSubscriptions_OwnerWithdraw:test_OwnerWithdraw_RevertIfNotOwner() (gas: 15555) @@ -167,7 +167,7 @@ FunctionsSubscriptions_OwnerWithdraw:test_OwnerWithdraw_SuccessIfRecipientAddres FunctionsSubscriptions_OwnerWithdraw:test_OwnerWithdraw_SuccessPaysRecipient() (gas: 54413) FunctionsSubscriptions_OwnerWithdraw:test_OwnerWithdraw_SuccessSetsBalanceToZero() (gas: 37790) FunctionsSubscriptions_PendingRequestExists:test_PendingRequestExists_SuccessFalseIfNoPendingRequests() (gas: 14981) -FunctionsSubscriptions_PendingRequestExists:test_PendingRequestExists_SuccessTrueIfPendingRequests() (gas: 203178) +FunctionsSubscriptions_PendingRequestExists:test_PendingRequestExists_SuccessTrueIfPendingRequests() (gas: 200979) FunctionsSubscriptions_ProposeSubscriptionOwnerTransfer:test_ProposeSubscriptionOwnerTransfer_RevertIfEmptyNewOwner() (gas: 27655) FunctionsSubscriptions_ProposeSubscriptionOwnerTransfer:test_ProposeSubscriptionOwnerTransfer_RevertIfInvalidNewOwner() (gas: 57797) FunctionsSubscriptions_ProposeSubscriptionOwnerTransfer:test_ProposeSubscriptionOwnerTransfer_RevertIfNoSubscription() (gas: 15001) @@ -183,7 +183,7 @@ FunctionsSubscriptions_RemoveConsumer:test_RemoveConsumer_RevertIfNoSubscription FunctionsSubscriptions_RemoveConsumer:test_RemoveConsumer_RevertIfNotAllowedSender() (gas: 102439) FunctionsSubscriptions_RemoveConsumer:test_RemoveConsumer_RevertIfNotSubscriptionOwner() (gas: 87245) FunctionsSubscriptions_RemoveConsumer:test_RemoveConsumer_RevertIfPaused() (gas: 18049) -FunctionsSubscriptions_RemoveConsumer:test_RemoveConsumer_RevertIfPendingRequests() (gas: 218586) +FunctionsSubscriptions_RemoveConsumer:test_RemoveConsumer_RevertIfPendingRequests() (gas: 216387) FunctionsSubscriptions_RemoveConsumer:test_RemoveConsumer_Success() (gas: 42023) FunctionsSubscriptions_SetFlags:test_SetFlags_RevertIfNoSubscription() (gas: 12891) FunctionsSubscriptions_SetFlags:test_SetFlags_RevertIfNotOwner() (gas: 15684) @@ -208,12 +208,12 @@ FunctionsTermsOfServiceAllowList_BlockSender:test_BlockSender_Success() (gas: 96 FunctionsTermsOfServiceAllowList_Constructor:test_Constructor_Success() (gas: 12253) FunctionsTermsOfServiceAllowList_GetAllAllowedSenders:test_GetAllAllowedSenders_Success() (gas: 19199) FunctionsTermsOfServiceAllowList_GetAllowedSendersCount:test_GetAllowedSendersCount_Success() (gas: 12995) -FunctionsTermsOfServiceAllowList_GetAllowedSendersInRange:test_GetAllowedSendersInRange_RevertIfAllowedSendersIsEmpty() (gas: 13462154) +FunctionsTermsOfServiceAllowList_GetAllowedSendersInRange:test_GetAllowedSendersInRange_RevertIfAllowedSendersIsEmpty() (gas: 13227517) FunctionsTermsOfServiceAllowList_GetAllowedSendersInRange:test_GetAllowedSendersInRange_RevertIfEndIsAfterLastAllowedSender() (gas: 16571) FunctionsTermsOfServiceAllowList_GetAllowedSendersInRange:test_GetAllowedSendersInRange_RevertIfStartIsAfterEnd() (gas: 13301) FunctionsTermsOfServiceAllowList_GetAllowedSendersInRange:test_GetAllowedSendersInRange_Success() (gas: 20448) FunctionsTermsOfServiceAllowList_GetBlockedSendersCount:test_GetBlockedSendersCount_Success() (gas: 12931) -FunctionsTermsOfServiceAllowList_GetBlockedSendersInRange:test_GetBlockedSendersInRange_RevertIfAllowedSendersIsEmpty() (gas: 13462158) +FunctionsTermsOfServiceAllowList_GetBlockedSendersInRange:test_GetBlockedSendersInRange_RevertIfAllowedSendersIsEmpty() (gas: 13227521) FunctionsTermsOfServiceAllowList_GetBlockedSendersInRange:test_GetBlockedSendersInRange_RevertIfEndIsAfterLastAllowedSender() (gas: 16549) FunctionsTermsOfServiceAllowList_GetBlockedSendersInRange:test_GetBlockedSendersInRange_RevertIfStartIsAfterEnd() (gas: 13367) FunctionsTermsOfServiceAllowList_GetBlockedSendersInRange:test_GetBlockedSendersInRange_Success() (gas: 18493) @@ -232,8 +232,8 @@ Gas_AddConsumer:test_AddConsumer_Gas() (gas: 79131) Gas_CreateSubscription:test_CreateSubscription_Gas() (gas: 73419) Gas_FulfillRequest_DuplicateRequestID:test_FulfillRequest_DuplicateRequestID_MaximumGas() (gas: 20819) Gas_FulfillRequest_DuplicateRequestID:test_FulfillRequest_DuplicateRequestID_MinimumGas() (gas: 20259) -Gas_FulfillRequest_Success:test_FulfillRequest_Success_MaximumGas() (gas: 527171) -Gas_FulfillRequest_Success:test_FulfillRequest_Success_MinimumGas() (gas: 228372) +Gas_FulfillRequest_Success:test_FulfillRequest_Success_MaximumGas() (gas: 522030) +Gas_FulfillRequest_Success:test_FulfillRequest_Success_MinimumGas() (gas: 223233) Gas_FundSubscription:test_FundSubscription_Gas() (gas: 38546) -Gas_SendRequest:test_SendRequest_MaximumGas() (gas: 1006818) -Gas_SendRequest:test_SendRequest_MinimumGas() (gas: 184262) \ No newline at end of file +Gas_SendRequest:test_SendRequest_MaximumGas() (gas: 1004094) +Gas_SendRequest:test_SendRequest_MinimumGas() (gas: 182062) \ No newline at end of file diff --git a/contracts/src/v0.8/functions/dev/v1_X/FunctionsBilling.sol b/contracts/src/v0.8/functions/dev/v1_X/FunctionsBilling.sol index eccbf6a7b51..770be5a00d1 100644 --- a/contracts/src/v0.8/functions/dev/v1_X/FunctionsBilling.sol +++ b/contracts/src/v0.8/functions/dev/v1_X/FunctionsBilling.sol @@ -27,9 +27,9 @@ abstract contract FunctionsBilling is Routable, IFunctionsBilling { uint96 juelsPerGas, uint256 l1FeeShareWei, uint96 callbackCostJuels, - uint72 donFee, - uint72 adminFee, - uint72 operationFee + uint72 donFeeJuels, + uint72 adminFeeJuels, + uint72 operationFeeJuels ); // ================================================================ @@ -124,11 +124,10 @@ abstract contract FunctionsBilling is Routable, IFunctionsBilling { /// @inheritdoc IFunctionsBilling function getWeiPerUnitLink() public view returns (uint256) { - FunctionsBillingConfig memory config = s_config; (, int256 weiPerUnitLink, , uint256 timestamp, ) = s_linkToNativeFeed.latestRoundData(); // solhint-disable-next-line not-rely-on-time - if (config.feedStalenessSeconds < block.timestamp - timestamp && config.feedStalenessSeconds > 0) { - return config.fallbackNativePerUnitLink; + if (s_config.feedStalenessSeconds < block.timestamp - timestamp && s_config.feedStalenessSeconds > 0) { + return s_config.fallbackNativePerUnitLink; } if (weiPerUnitLink <= 0) { revert InvalidLinkWeiPrice(weiPerUnitLink); @@ -144,11 +143,10 @@ abstract contract FunctionsBilling is Routable, IFunctionsBilling { /// @inheritdoc IFunctionsBilling function getUsdPerUnitLink() public view returns (uint256, uint8) { - FunctionsBillingConfig memory config = s_config; (, int256 usdPerUnitLink, , uint256 timestamp, ) = s_linkToUsdFeed.latestRoundData(); // solhint-disable-next-line not-rely-on-time - if (config.feedStalenessSeconds < block.timestamp - timestamp && config.feedStalenessSeconds > 0) { - return (config.fallbackUsdPerUnitLink, config.fallbackUsdPerUnitLinkDecimals); + if (s_config.feedStalenessSeconds < block.timestamp - timestamp && s_config.feedStalenessSeconds > 0) { + return (s_config.fallbackUsdPerUnitLink, s_config.fallbackUsdPerUnitLinkDecimals); } if (usdPerUnitLink <= 0) { revert InvalidUsdLinkPrice(usdPerUnitLink); @@ -224,10 +222,8 @@ abstract contract FunctionsBilling is Routable, IFunctionsBilling { function _startBilling( FunctionsResponse.RequestMeta memory request ) internal returns (FunctionsResponse.CommitmentWithOperationFee memory commitment) { - FunctionsBillingConfig memory config = s_config; - // Nodes should support all past versions of the structure - if (request.dataVersion > config.maxSupportedRequestDataVersion) { + if (request.dataVersion > s_config.maxSupportedRequestDataVersion) { revert UnsupportedRequestDataVersion(); } @@ -246,7 +242,7 @@ abstract contract FunctionsBilling is Routable, IFunctionsBilling { revert InsufficientBalance(); } - uint32 timeoutTimestamp = uint32(block.timestamp + config.requestTimeoutSeconds); + uint32 timeoutTimestamp = uint32(block.timestamp + s_config.requestTimeoutSeconds); bytes32 requestId = keccak256( abi.encode( address(this), @@ -274,8 +270,8 @@ abstract contract FunctionsBilling is Routable, IFunctionsBilling { requestId: requestId, donFee: donFee, operationFee: operationFee, - gasOverheadBeforeCallback: config.gasOverheadBeforeCallback, - gasOverheadAfterCallback: config.gasOverheadAfterCallback + gasOverheadBeforeCallback: s_config.gasOverheadBeforeCallback, + gasOverheadAfterCallback: s_config.gasOverheadAfterCallback }); s_requestCommitments[requestId] = keccak256(abi.encode(commitment)); @@ -352,9 +348,9 @@ abstract contract FunctionsBilling is Routable, IFunctionsBilling { juelsPerGas: juelsPerGas, l1FeeShareWei: l1FeeShareWei, callbackCostJuels: callbackCostJuels, - donFee: commitment.donFee, - adminFee: commitment.adminFee, - operationFee: commitment.operationFee + donFeeJuels: commitment.donFee, + adminFeeJuels: commitment.adminFee, + operationFeeJuels: commitment.operationFee }); } return resultCode; @@ -439,7 +435,7 @@ abstract contract FunctionsBilling is Routable, IFunctionsBilling { function _isExistingRequest(bytes32 requestId) internal view returns (bool) { return s_requestCommitments[requestId] != bytes32(0); } - + // Overriden in FunctionsCoordinator.sol function _owner() internal view virtual returns (address owner); } diff --git a/contracts/src/v0.8/functions/dev/v1_X/FunctionsCoordinator.sol b/contracts/src/v0.8/functions/dev/v1_X/FunctionsCoordinator.sol index e28b7e13a68..0b195199d67 100644 --- a/contracts/src/v0.8/functions/dev/v1_X/FunctionsCoordinator.sol +++ b/contracts/src/v0.8/functions/dev/v1_X/FunctionsCoordinator.sol @@ -81,10 +81,9 @@ contract FunctionsCoordinator is OCR2Base, IFunctionsCoordinator, FunctionsBilli /// @dev check if node is in current transmitter list function _isTransmitter(address node) internal view returns (bool) { - address[] memory nodes = s_transmitters; // Bounded by "maxNumOracles" on OCR2Abstract.sol - for (uint256 i = 0; i < nodes.length; ++i) { - if (nodes[i] == node) { + for (uint256 i = 0; i < s_transmitters.length; ++i) { + if (s_transmitters[i] == node) { return true; } } diff --git a/contracts/src/v0.8/functions/dev/v1_X/interfaces/IFunctionsBilling.sol b/contracts/src/v0.8/functions/dev/v1_X/interfaces/IFunctionsBilling.sol index 08676b9912a..2b3c7ad1a4c 100644 --- a/contracts/src/v0.8/functions/dev/v1_X/interfaces/IFunctionsBilling.sol +++ b/contracts/src/v0.8/functions/dev/v1_X/interfaces/IFunctionsBilling.sol @@ -62,12 +62,12 @@ struct FunctionsBillingConfig { uint32 feedStalenessSeconds; // ║ How long before we consider the feed price to be stale and fallback to fallbackNativePerUnitLink. uint32 gasOverheadBeforeCallback; // ║ Represents the average gas execution cost before the fulfillment callback. This amount is always billed for every request. uint32 gasOverheadAfterCallback; // ║ Represents the average gas execution cost after the fulfillment callback. This amount is always billed for every request. - uint72 donFee; // ║ Additional flat fee (denominated in cents of USD, paid as LINK) that will be split between Node Operators. uint40 minimumEstimateGasPriceWei; // ║ The lowest amount of wei that will be used as the tx.gasprice when estimating the cost to fulfill the request - uint16 maxSupportedRequestDataVersion; // ═══════╝ The highest support request data version supported by the node. All lower versions should also be supported. - uint224 fallbackNativePerUnitLink; // ═══════════╗ Fallback NATIVE CURRENCY / LINK conversion rate if the data feed is stale - uint32 requestTimeoutSeconds; // ════════════════╝ How many seconds it takes before we consider a request to be timed out - uint72 operationFee; // ═════════════════════════╗ Additional flat fee (denominated in cents of USD, paid as LINK) that will be paid to the owner of the Coordinator contract. + uint16 maxSupportedRequestDataVersion; // ║ The highest support request data version supported by the node. All lower versions should also be supported. uint64 fallbackUsdPerUnitLink; // ║ Fallback LINK / USD conversion rate if the data feed is stale uint8 fallbackUsdPerUnitLinkDecimals; // ════════╝ Fallback LINK / USD conversion rate decimal places if the data feed is stale + uint224 fallbackNativePerUnitLink; // ═══════════╗ Fallback NATIVE CURRENCY / LINK conversion rate if the data feed is stale + uint32 requestTimeoutSeconds; // ════════════════╝ How many seconds it takes before we consider a request to be timed out + uint16 donFee; // ═══════════════════════════════╗ Additional flat fee (denominated in cents of USD, paid as LINK) that will be split between Node Operators. + uint16 operationFee; // ═════════════════════════╝ Additional flat fee (denominated in cents of USD, paid as LINK) that will be paid to the owner of the Coordinator contract. } diff --git a/contracts/src/v0.8/functions/dev/v1_X/libraries/FunctionsResponse.sol b/contracts/src/v0.8/functions/dev/v1_X/libraries/FunctionsResponse.sol index 126238830dc..419d11dd569 100644 --- a/contracts/src/v0.8/functions/dev/v1_X/libraries/FunctionsResponse.sol +++ b/contracts/src/v0.8/functions/dev/v1_X/libraries/FunctionsResponse.sol @@ -55,6 +55,6 @@ library FunctionsResponse { uint40 gasOverheadBeforeCallback; // ║ Represents the average gas execution cost before the fulfillment callback. uint40 gasOverheadAfterCallback; // ║ Represents the average gas execution cost after the fulfillment callback. uint32 timeoutTimestamp; // ═══════════╝ The timestamp at which a request will be eligible to be timed out - uint72 operationFee; // ══════════════════════ Flat fee (in Juels of LINK) that will be paid to the Coordinator Owner for operation of the network + uint72 operationFee; // ═══════════════╸ Flat fee (in Juels of LINK) that will be paid to the Coordinator Owner for operation of the network } } diff --git a/contracts/src/v0.8/functions/tests/v1_X/FunctionsBilling.t.sol b/contracts/src/v0.8/functions/tests/v1_X/FunctionsBilling.t.sol index b65d8ef8746..90be81d0e86 100644 --- a/contracts/src/v0.8/functions/tests/v1_X/FunctionsBilling.t.sol +++ b/contracts/src/v0.8/functions/tests/v1_X/FunctionsBilling.t.sol @@ -46,6 +46,7 @@ contract FunctionsBilling_UpdateConfig is FunctionsRouterSetup { function setUp() public virtual override { FunctionsRouterSetup.setUp(); + // Multiply all config values by 2 to confirm that they change configToSet = FunctionsBillingConfig({ feedStalenessSeconds: getCoordinatorConfig().feedStalenessSeconds * 2, gasOverheadAfterCallback: getCoordinatorConfig().gasOverheadAfterCallback * 2, diff --git a/contracts/src/v0.8/functions/tests/v1_X/Setup.t.sol b/contracts/src/v0.8/functions/tests/v1_X/Setup.t.sol index 82f81c6f043..031237040b1 100644 --- a/contracts/src/v0.8/functions/tests/v1_X/Setup.t.sol +++ b/contracts/src/v0.8/functions/tests/v1_X/Setup.t.sol @@ -26,8 +26,8 @@ contract FunctionsRouterSetup is BaseTest { uint16 internal s_maxConsumersPerSubscription = 3; uint72 internal s_adminFee = 100; // 100 Juels - uint72 internal s_donFee = 100; // $1 - uint72 internal s_operationFee = 100; // $1 + uint16 internal s_donFee = 100; // $1 + uint16 internal s_operationFee = 100; // $1 bytes4 internal s_handleOracleFulfillmentSelector = 0x0ca76175; uint16 s_subscriptionDepositMinimumRequests = 1; uint72 s_subscriptionDepositJuels = 11 * JUELS_PER_LINK; diff --git a/core/gethwrappers/functions/generated/functions_coordinator/functions_coordinator.go b/core/gethwrappers/functions/generated/functions_coordinator/functions_coordinator.go index f297be99f07..bce5ae0ba8f 100644 --- a/core/gethwrappers/functions/generated/functions_coordinator/functions_coordinator.go +++ b/core/gethwrappers/functions/generated/functions_coordinator/functions_coordinator.go @@ -35,14 +35,14 @@ type FunctionsBillingConfig struct { FeedStalenessSeconds uint32 GasOverheadBeforeCallback uint32 GasOverheadAfterCallback uint32 - DonFee *big.Int MinimumEstimateGasPriceWei *big.Int MaxSupportedRequestDataVersion uint16 - FallbackNativePerUnitLink *big.Int - RequestTimeoutSeconds uint32 - OperationFee *big.Int FallbackUsdPerUnitLink uint64 FallbackUsdPerUnitLinkDecimals uint8 + FallbackNativePerUnitLink *big.Int + RequestTimeoutSeconds uint32 + DonFee uint16 + OperationFee uint16 } type FunctionsResponseCommitment struct { @@ -89,8 +89,8 @@ type FunctionsResponseRequestMeta struct { } var FunctionsCoordinatorMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"fulfillmentGasPriceOverEstimationBP\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"feedStalenessSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasOverheadBeforeCallback\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasOverheadAfterCallback\",\"type\":\"uint32\"},{\"internalType\":\"uint72\",\"name\":\"donFee\",\"type\":\"uint72\"},{\"internalType\":\"uint40\",\"name\":\"minimumEstimateGasPriceWei\",\"type\":\"uint40\"},{\"internalType\":\"uint16\",\"name\":\"maxSupportedRequestDataVersion\",\"type\":\"uint16\"},{\"internalType\":\"uint224\",\"name\":\"fallbackNativePerUnitLink\",\"type\":\"uint224\"},{\"internalType\":\"uint32\",\"name\":\"requestTimeoutSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint72\",\"name\":\"operationFee\",\"type\":\"uint72\"},{\"internalType\":\"uint64\",\"name\":\"fallbackUsdPerUnitLink\",\"type\":\"uint64\"},{\"internalType\":\"uint8\",\"name\":\"fallbackUsdPerUnitLinkDecimals\",\"type\":\"uint8\"}],\"internalType\":\"structFunctionsBillingConfig\",\"name\":\"config\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"linkToNativeFeed\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"linkToUsdFeed\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"EmptyPublicKey\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InconsistentReportData\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientBalance\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidCalldata\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"message\",\"type\":\"string\"}],\"name\":\"InvalidConfig\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"int256\",\"name\":\"linkWei\",\"type\":\"int256\"}],\"name\":\"InvalidLinkWeiPrice\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidSubscription\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"int256\",\"name\":\"usdLink\",\"type\":\"int256\"}],\"name\":\"InvalidUsdLinkPrice\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"MustBeSubOwner\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NoTransmittersSet\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByRouter\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByRouterOwner\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PaymentTooLarge\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"message\",\"type\":\"string\"}],\"name\":\"ReportInvalid\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RouterMustBeSet\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnauthorizedPublicKeyChange\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnauthorizedSender\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnsupportedRequestDataVersion\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"requestId\",\"type\":\"bytes32\"}],\"name\":\"CommitmentDeleted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"previousConfigBlockNumber\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"configCount\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"signers\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"transmitters\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"onchainConfig\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"offchainConfigVersion\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"}],\"name\":\"ConfigSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"fulfillmentGasPriceOverEstimationBP\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"feedStalenessSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasOverheadBeforeCallback\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasOverheadAfterCallback\",\"type\":\"uint32\"},{\"internalType\":\"uint72\",\"name\":\"donFee\",\"type\":\"uint72\"},{\"internalType\":\"uint40\",\"name\":\"minimumEstimateGasPriceWei\",\"type\":\"uint40\"},{\"internalType\":\"uint16\",\"name\":\"maxSupportedRequestDataVersion\",\"type\":\"uint16\"},{\"internalType\":\"uint224\",\"name\":\"fallbackNativePerUnitLink\",\"type\":\"uint224\"},{\"internalType\":\"uint32\",\"name\":\"requestTimeoutSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint72\",\"name\":\"operationFee\",\"type\":\"uint72\"},{\"internalType\":\"uint64\",\"name\":\"fallbackUsdPerUnitLink\",\"type\":\"uint64\"},{\"internalType\":\"uint8\",\"name\":\"fallbackUsdPerUnitLinkDecimals\",\"type\":\"uint8\"}],\"indexed\":false,\"internalType\":\"structFunctionsBillingConfig\",\"name\":\"config\",\"type\":\"tuple\"}],\"name\":\"ConfigUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"requestId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"requestingContract\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"requestInitiator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"subscriptionId\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"subscriptionOwner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"dataVersion\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"flags\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"callbackGasLimit\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"requestId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"coordinator\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"estimatedTotalCostJuels\",\"type\":\"uint96\"},{\"internalType\":\"address\",\"name\":\"client\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"subscriptionId\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint72\",\"name\":\"adminFee\",\"type\":\"uint72\"},{\"internalType\":\"uint72\",\"name\":\"donFee\",\"type\":\"uint72\"},{\"internalType\":\"uint40\",\"name\":\"gasOverheadBeforeCallback\",\"type\":\"uint40\"},{\"internalType\":\"uint40\",\"name\":\"gasOverheadAfterCallback\",\"type\":\"uint40\"},{\"internalType\":\"uint32\",\"name\":\"timeoutTimestamp\",\"type\":\"uint32\"},{\"internalType\":\"uint72\",\"name\":\"operationFee\",\"type\":\"uint72\"}],\"indexed\":false,\"internalType\":\"structFunctionsResponse.CommitmentWithOperationFee\",\"name\":\"commitment\",\"type\":\"tuple\"}],\"name\":\"OracleRequest\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"requestId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"transmitter\",\"type\":\"address\"}],\"name\":\"OracleResponse\",\"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\":\"bytes32\",\"name\":\"requestId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"juelsPerGas\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"l1FeeShareWei\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"callbackCostJuels\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint72\",\"name\":\"donFee\",\"type\":\"uint72\"},{\"indexed\":false,\"internalType\":\"uint72\",\"name\":\"adminFee\",\"type\":\"uint72\"},{\"indexed\":false,\"internalType\":\"uint72\",\"name\":\"operationFee\",\"type\":\"uint72\"}],\"name\":\"RequestBilled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"epoch\",\"type\":\"uint32\"}],\"name\":\"Transmitted\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"requestId\",\"type\":\"bytes32\"}],\"name\":\"deleteCommitment\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"subscriptionId\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"gasPriceWei\",\"type\":\"uint256\"}],\"name\":\"estimateCost\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAdminFee\",\"outputs\":[{\"internalType\":\"uint72\",\"name\":\"\",\"type\":\"uint72\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getConfig\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"fulfillmentGasPriceOverEstimationBP\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"feedStalenessSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasOverheadBeforeCallback\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasOverheadAfterCallback\",\"type\":\"uint32\"},{\"internalType\":\"uint72\",\"name\":\"donFee\",\"type\":\"uint72\"},{\"internalType\":\"uint40\",\"name\":\"minimumEstimateGasPriceWei\",\"type\":\"uint40\"},{\"internalType\":\"uint16\",\"name\":\"maxSupportedRequestDataVersion\",\"type\":\"uint16\"},{\"internalType\":\"uint224\",\"name\":\"fallbackNativePerUnitLink\",\"type\":\"uint224\"},{\"internalType\":\"uint32\",\"name\":\"requestTimeoutSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint72\",\"name\":\"operationFee\",\"type\":\"uint72\"},{\"internalType\":\"uint64\",\"name\":\"fallbackUsdPerUnitLink\",\"type\":\"uint64\"},{\"internalType\":\"uint8\",\"name\":\"fallbackUsdPerUnitLinkDecimals\",\"type\":\"uint8\"}],\"internalType\":\"structFunctionsBillingConfig\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"getDONFee\",\"outputs\":[{\"internalType\":\"uint72\",\"name\":\"\",\"type\":\"uint72\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getDONPublicKey\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getOperationFee\",\"outputs\":[{\"internalType\":\"uint72\",\"name\":\"\",\"type\":\"uint72\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getThresholdPublicKey\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getUsdPerUnitLink\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getWeiPerUnitLink\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestConfigDetails\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"configCount\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blockNumber\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestConfigDigestAndEpoch\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"scanLogs\",\"type\":\"bool\"},{\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"epoch\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"oracleWithdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"oracleWithdrawAll\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_signers\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"_transmitters\",\"type\":\"address[]\"},{\"internalType\":\"uint8\",\"name\":\"_f\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"_onchainConfig\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"_offchainConfigVersion\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"_offchainConfig\",\"type\":\"bytes\"}],\"name\":\"setConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"donPublicKey\",\"type\":\"bytes\"}],\"name\":\"setDONPublicKey\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"thresholdPublicKey\",\"type\":\"bytes\"}],\"name\":\"setThresholdPublicKey\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"flags\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"requestingContract\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"availableBalance\",\"type\":\"uint96\"},{\"internalType\":\"uint72\",\"name\":\"adminFee\",\"type\":\"uint72\"},{\"internalType\":\"uint64\",\"name\":\"subscriptionId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"initiatedRequests\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"dataVersion\",\"type\":\"uint16\"},{\"internalType\":\"uint64\",\"name\":\"completedRequests\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"subscriptionOwner\",\"type\":\"address\"}],\"internalType\":\"structFunctionsResponse.RequestMeta\",\"name\":\"request\",\"type\":\"tuple\"}],\"name\":\"startRequest\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"requestId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"coordinator\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"estimatedTotalCostJuels\",\"type\":\"uint96\"},{\"internalType\":\"address\",\"name\":\"client\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"subscriptionId\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint72\",\"name\":\"adminFee\",\"type\":\"uint72\"},{\"internalType\":\"uint72\",\"name\":\"donFee\",\"type\":\"uint72\"},{\"internalType\":\"uint40\",\"name\":\"gasOverheadBeforeCallback\",\"type\":\"uint40\"},{\"internalType\":\"uint40\",\"name\":\"gasOverheadAfterCallback\",\"type\":\"uint40\"},{\"internalType\":\"uint32\",\"name\":\"timeoutTimestamp\",\"type\":\"uint32\"}],\"internalType\":\"structFunctionsResponse.Commitment\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[3]\",\"name\":\"reportContext\",\"type\":\"bytes32[3]\"},{\"internalType\":\"bytes\",\"name\":\"report\",\"type\":\"bytes\"},{\"internalType\":\"bytes32[]\",\"name\":\"rs\",\"type\":\"bytes32[]\"},{\"internalType\":\"bytes32[]\",\"name\":\"ss\",\"type\":\"bytes32[]\"},{\"internalType\":\"bytes32\",\"name\":\"rawVs\",\"type\":\"bytes32\"}],\"name\":\"transmit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"transmitters\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"typeAndVersion\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"fulfillmentGasPriceOverEstimationBP\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"feedStalenessSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasOverheadBeforeCallback\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasOverheadAfterCallback\",\"type\":\"uint32\"},{\"internalType\":\"uint72\",\"name\":\"donFee\",\"type\":\"uint72\"},{\"internalType\":\"uint40\",\"name\":\"minimumEstimateGasPriceWei\",\"type\":\"uint40\"},{\"internalType\":\"uint16\",\"name\":\"maxSupportedRequestDataVersion\",\"type\":\"uint16\"},{\"internalType\":\"uint224\",\"name\":\"fallbackNativePerUnitLink\",\"type\":\"uint224\"},{\"internalType\":\"uint32\",\"name\":\"requestTimeoutSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint72\",\"name\":\"operationFee\",\"type\":\"uint72\"},{\"internalType\":\"uint64\",\"name\":\"fallbackUsdPerUnitLink\",\"type\":\"uint64\"},{\"internalType\":\"uint8\",\"name\":\"fallbackUsdPerUnitLinkDecimals\",\"type\":\"uint8\"}],\"internalType\":\"structFunctionsBillingConfig\",\"name\":\"config\",\"type\":\"tuple\"}],\"name\":\"updateConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x60a06040523480156200001157600080fd5b50604051620065e6380380620065e6833981016040819052620000349162000504565b83838383833380600081620000905760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000c357620000c3816200014e565b5050506001600160a01b038116620000ee57604051632530e88560e11b815260040160405180910390fd5b6001600160a01b03908116608052600c80546001600160601b03166c0100000000000000000000000085841602179055600d80546001600160a01b0319169183169190911790556200014083620001f9565b505050505050505062000773565b336001600160a01b03821603620001a85760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000087565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b62000203620003af565b80516008805460208401516040808601516060870151608088015160a089015160c08a015161ffff16600160f01b026001600160f01b0364ffffffffff909216600160c81b0264ffffffffff60c81b196001600160481b03948516600160801b0216600160801b600160f01b031963ffffffff9687166c010000000000000000000000000263ffffffff60601b19988816680100000000000000000298909816600160401b600160801b03199a8816640100000000026001600160401b0319909c169d88169d909d179a909a17989098169a909a1794909417969096169490941796909617939093169290921790925560e0840151610100850151909316600160e01b026001600160e01b0390931692909217600955610120830151600a805461014086015161016087015160ff16600160881b0260ff60881b196001600160401b039092166901000000000000000000026001600160881b031990931694909516939093171791909116919091179055517f165999a4d7499227f20106b83c79a73315af2ecd639138d441db651c5f635e8690620003a490839062000662565b60405180910390a150565b620003b9620003bb565b565b6000546001600160a01b03163314620003b95760405162461bcd60e51b815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000604482015260640162000087565b80516001600160a01b03811681146200042f57600080fd5b919050565b60405161018081016001600160401b03811182821017156200046657634e487b7160e01b600052604160045260246000fd5b60405290565b805163ffffffff811681146200042f57600080fd5b80516001600160481b03811681146200042f57600080fd5b805164ffffffffff811681146200042f57600080fd5b805161ffff811681146200042f57600080fd5b80516001600160e01b03811681146200042f57600080fd5b80516001600160401b03811681146200042f57600080fd5b805160ff811681146200042f57600080fd5b6000806000808486036101e08112156200051d57600080fd5b620005288662000417565b945061018080601f19830112156200053f57600080fd5b6200054962000434565b915062000559602088016200046c565b825262000569604088016200046c565b60208301526200057c606088016200046c565b60408301526200058f608088016200046c565b6060830152620005a260a0880162000481565b6080830152620005b560c0880162000499565b60a0830152620005c860e08801620004af565b60c0830152610100620005dd818901620004c2565b60e0840152610120620005f2818a016200046c565b82850152610140915062000608828a0162000481565b908401526101606200061c898201620004da565b828501526200062d838a01620004f2565b90840152509093506200064690506101a0860162000417565b9150620006576101c0860162000417565b905092959194509250565b815163ffffffff1681526101808101602083015162000689602084018263ffffffff169052565b506040830151620006a2604084018263ffffffff169052565b506060830151620006bb606084018263ffffffff169052565b506080830151620006d760808401826001600160481b03169052565b5060a0830151620006f160a084018264ffffffffff169052565b5060c08301516200070860c084018261ffff169052565b5060e08301516200072460e08401826001600160e01b03169052565b506101008381015163ffffffff1690830152610120808401516001600160481b031690830152610140808401516001600160401b0316908301526101609283015160ff16929091019190915290565b608051615e2d620007b9600039600081816106740152818161085a01528181610e63015281816110f70152818161120d01528181611a4c0152613d8c0152615e2d6000f3fe608060405234801561001057600080fd5b50600436106101a35760003560e01c806385b214cf116100ee578063d227d24511610097578063e3d0e71211610071578063e3d0e712146105d7578063e4ddcea6146105ea578063ec2c65c114610600578063f2fde38b1461060857600080fd5b8063d227d2451461058c578063d328a91e146105bc578063dd967201146105c457600080fd5b8063afcb95d7116100c8578063afcb95d71461037e578063b1dc65a41461039e578063c3f909d4146103b157600080fd5b806385b214cf146103235780638da5cb5b14610336578063a631571e1461035e57600080fd5b806379ba509711610150578063814118341161012a578063814118341461029957806381f1b938146102ae57806381ff7048146102b657600080fd5b806379ba5097146102765780637d4807871461027e5780637f15e1661461028657600080fd5b806359b5b7ac1161018157806359b5b7ac1461023157806366316d8d146102445780637212762f1461025757600080fd5b8063083a5466146101a8578063181f5a77146101bd5780632a905ccc1461020f575b600080fd5b6101bb6101b636600461443c565b61061b565b005b6101f96040518060400160405280601c81526020017f46756e6374696f6e7320436f6f7264696e61746f722076322e302e300000000081525081565b60405161020691906144ec565b60405180910390f35b610217610670565b60405168ffffffffffffffffff9091168152602001610206565b61021761023f366004614659565b610706565b6101bb6102523660046146e0565b61075e565b61025f610917565b6040805192835260ff909116602083015201610206565b6101bb610c52565b6101bb610d4f565b6101bb61029436600461443c565b610f4f565b6102a1610f9f565b604051610206919061476a565b6101f961100e565b61030060015460025463ffffffff74010000000000000000000000000000000000000000830481169378010000000000000000000000000000000000000000000000009093041691565b6040805163ffffffff948516815293909216602084015290820152606001610206565b6101bb61033136600461477d565b6110df565b60005460405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610206565b61037161036c366004614796565b61119c565b60405161020691906148f7565b604080516001815260006020820181905291810191909152606001610206565b6101bb6103ac36600461494b565b611431565b61057f6040805161018081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e0810182905261010081018290526101208101829052610140810182905261016081019190915250604080516101808101825260085463ffffffff80821683526401000000008204811660208401526801000000000000000082048116938301939093526c01000000000000000000000000810483166060830152700100000000000000000000000000000000810468ffffffffffffffffff9081166080840152790100000000000000000000000000000000000000000000000000820464ffffffffff1660a08401527e0100000000000000000000000000000000000000000000000000000000000090910461ffff1660c08301526009547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff811660e08401527c01000000000000000000000000000000000000000000000000000000009004909216610100820152600a549182166101208201526901000000000000000000820467ffffffffffffffff166101408201527101000000000000000000000000000000000090910460ff1661016082015290565b6040516102069190614a02565b61059f61059a366004614b67565b611a48565b6040516bffffffffffffffffffffffff9091168152602001610206565b6101f9611bb6565b6101bb6105d2366004614c6f565b611c0d565b6101bb6105e5366004614df3565b611eec565b6105f2612a68565b604051908152602001610206565b610217612d0b565b6101bb610616366004614ec0565b612d2c565b610623612d40565b600081900361065e576040517f4f42be3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600f61066b828483614f76565b505050565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16632a905ccc6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106dd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610701919061509c565b905090565b6008546000906107589060649061073b90700100000000000000000000000000000000900468ffffffffffffffffff16612dc3565b6107459190615117565b6bffffffffffffffffffffffff16612e10565b92915050565b610766612eaf565b806bffffffffffffffffffffffff166000036107a05750336000908152600b60205260409020546bffffffffffffffffffffffff166107fa565b336000908152600b60205260409020546bffffffffffffffffffffffff808316911610156107fa576040517ff4d678b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336000908152600b6020526040812080548392906108279084906bffffffffffffffffffffffff16615142565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff16021790555061087c7f000000000000000000000000000000000000000000000000000000000000000090565b6040517f66316d8d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301526bffffffffffffffffffffffff8416602483015291909116906366316d8d90604401600060405180830381600087803b1580156108fb57600080fd5b505af115801561090f573d6000803e3d6000fd5b505050505050565b604080516101808101825260085463ffffffff80821683526401000000008204811660208401526801000000000000000082048116838501526c01000000000000000000000000820481166060840152700100000000000000000000000000000000820468ffffffffffffffffff9081166080850152790100000000000000000000000000000000000000000000000000830464ffffffffff1660a0808601919091527e0100000000000000000000000000000000000000000000000000000000000090930461ffff1660c08501526009547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff811660e08601527c01000000000000000000000000000000000000000000000000000000009004909116610100840152600a549081166101208401526901000000000000000000810467ffffffffffffffff1661014084015271010000000000000000000000000000000000900460ff16610160830152600d5483517ffeaf968c00000000000000000000000000000000000000000000000000000000815293516000948594938593849373ffffffffffffffffffffffffffffffffffffffff9091169263feaf968c9260048083019391928290030181865afa158015610af1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b159190615181565b509350509250508042610b2891906151d1565b836020015163ffffffff16108015610b4a57506000836020015163ffffffff16115b15610b725750506101408101516101609091015167ffffffffffffffff909116939092509050565b60008213610bb4576040517f56b22ab8000000000000000000000000000000000000000000000000000000008152600481018390526024015b60405180910390fd5b600d54604080517f313ce5670000000000000000000000000000000000000000000000000000000081529051849273ffffffffffffffffffffffffffffffffffffffff169163313ce5679160048083019260209291908290030181865afa158015610c23573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c4791906151e4565b945094505050509091565b60015473ffffffffffffffffffffffffffffffffffffffff163314610cd3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e6572000000000000000000006044820152606401610bab565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b610d5761305b565b610d5f612eaf565b6000610d69610f9f565b905060005b8151811015610f4b576000600b6000848481518110610d8f57610d8f615201565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff168252810191909152604001600020546bffffffffffffffffffffffff1690508015610f3a576000600b6000858581518110610dee57610dee615201565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550610e857f000000000000000000000000000000000000000000000000000000000000000090565b73ffffffffffffffffffffffffffffffffffffffff166366316d8d848481518110610eb257610eb2615201565b6020026020010151836040518363ffffffff1660e01b8152600401610f0792919073ffffffffffffffffffffffffffffffffffffffff9290921682526bffffffffffffffffffffffff16602082015260400190565b600060405180830381600087803b158015610f2157600080fd5b505af1158015610f35573d6000803e3d6000fd5b505050505b50610f4481615230565b9050610d6e565b5050565b610f57612d40565b6000819003610f92576040517f4f42be3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600e61066b828483614f76565b6060600680548060200260200160405190810160405280929190818152602001828054801561100457602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311610fd9575b5050505050905090565b6060600f805461101d90614edd565b9050600003611058576040517f4f42be3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600f805461106590614edd565b80601f016020809104026020016040519081016040528092919081815260200182805461109190614edd565b80156110045780601f106110b357610100808354040283529160200191611004565b820191906000526020600020905b8154815290600101906020018083116110c157509395945050505050565b3373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161461114e576040517fc41a5b0900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008181526007602052604080822091909155517f8a4b97add3359bd6bcf5e82874363670eb5ad0f7615abddbd0ed0a3a98f0f416906111919083815260200190565b60405180910390a150565b6040805161016081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810182905261012081018290526101408101919091523373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614611264576040517fc41a5b0900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061127761127284615268565b613063565b90506112896060840160408501614ec0565b815173ffffffffffffffffffffffffffffffffffffffff91909116907f718684b6c135c1277575a7b5c7365bc9587d5ebfd899230d5fa11360f6143bfb326112d760c0880160a08901615355565b6112e961016089016101408a01614ec0565b6112f38980615372565b6113056101208c016101008d016153d7565b60208c013561131b6101008e0160e08f016153f2565b8b60405161133199989796959493929190615543565b60405180910390a360405180610160016040528082600001518152602001826020015173ffffffffffffffffffffffffffffffffffffffff16815260200182604001516bffffffffffffffffffffffff168152602001826060015173ffffffffffffffffffffffffffffffffffffffff168152602001826080015167ffffffffffffffff1681526020018260a0015163ffffffff1681526020018260c0015168ffffffffffffffffff1681526020018260e0015168ffffffffffffffffff16815260200182610100015164ffffffffff16815260200182610120015164ffffffffff16815260200182610140015163ffffffff168152509150505b919050565b60008061143e898961355e565b91509150811561144f575050611a3e565b604080518b3580825262ffffff6020808f0135600881901c9290921690840152909290917fb04e63db38c49950639fa09d29872f21f5d49d614f3a969d8adf3d4b52e41a62910160405180910390a16114ac8b8b8b8b8b8b6136e7565b6003546000906002906114ca9060ff808216916101009004166155f9565b6114d49190615612565b6114df9060016155f9565b60ff16905088811461154d576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f77726f6e67206e756d626572206f66207369676e6174757265730000000000006044820152606401610bab565b8887146115dc576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f7265706f727420727320616e64207373206d757374206265206f66206571756160448201527f6c206c656e6774680000000000000000000000000000000000000000000000006064820152608401610bab565b3360009081526004602090815260408083208151808301909252805460ff8082168452929391929184019161010090910416600281111561161f5761161f615634565b600281111561163057611630615634565b905250905060028160200151600281111561164d5761164d615634565b1415801561169657506006816000015160ff168154811061167057611670615201565b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff163314155b156116fd576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f756e617574686f72697a6564207472616e736d697474657200000000000000006044820152606401610bab565b505050506117096143db565b60008a8a60405161171b929190615663565b604051908190038120611732918e90602001615673565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181528282528051602091820120838301909252600080845290830152915060005b89811015611a2e57600060018489846020811061179b5761179b615201565b6117a891901a601b6155f9565b8e8e868181106117ba576117ba615201565b905060200201358d8d878181106117d3576117d3615201565b9050602002013560405160008152602001604052604051611810949392919093845260ff9290921660208401526040830152606082015260800190565b6020604051602081039080840390855afa158015611832573d6000803e3d6000fd5b5050604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081015173ffffffffffffffffffffffffffffffffffffffff811660009081526004602090815290849020838501909452835460ff808216855292965092945084019161010090041660028111156118b2576118b2615634565b60028111156118c3576118c3615634565b90525092506001836020015160028111156118e0576118e0615634565b14611947576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f61646472657373206e6f7420617574686f72697a656420746f207369676e00006044820152606401610bab565b8251600090869060ff16601f811061196157611961615201565b602002015173ffffffffffffffffffffffffffffffffffffffff16146119e3576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f6e6f6e2d756e69717565207369676e61747572650000000000000000000000006044820152606401610bab565b8085846000015160ff16601f81106119fd576119fd615201565b73ffffffffffffffffffffffffffffffffffffffff909216602092909202015250611a2781615230565b905061177c565b505050611a3a8261379e565b5050505b5050505050505050565b60007f00000000000000000000000000000000000000000000000000000000000000006040517f10fc49c100000000000000000000000000000000000000000000000000000000815267ffffffffffffffff8816600482015263ffffffff8516602482015273ffffffffffffffffffffffffffffffffffffffff91909116906310fc49c19060440160006040518083038186803b158015611ae857600080fd5b505afa158015611afc573d6000803e3d6000fd5b5050505066038d7ea4c68000821115611b41576040517f8129bbcd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000611b4b610670565b90506000611b8e87878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061070692505050565b90506000611b9a612d0b565b9050611ba986868486856138ed565b9998505050505050505050565b6060600e8054611bc590614edd565b9050600003611c00576040517f4f42be3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600e805461106590614edd565b611c1561305b565b80516008805460208401516040808601516060870151608088015160a089015160c08a015161ffff167e01000000000000000000000000000000000000000000000000000000000000027dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff64ffffffffff909216790100000000000000000000000000000000000000000000000000027fffff0000000000ffffffffffffffffffffffffffffffffffffffffffffffffff68ffffffffffffffffff94851670010000000000000000000000000000000002167fffff0000000000000000000000000000ffffffffffffffffffffffffffffffff63ffffffff9687166c01000000000000000000000000027fffffffffffffffffffffffffffffffff00000000ffffffffffffffffffffffff9888166801000000000000000002989098167fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff9a8816640100000000027fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000909c169d88169d909d179a909a17989098169a909a1794909417969096169490941796909617939093169290921790925560e08401516101008501519093167c0100000000000000000000000000000000000000000000000000000000027bffffffffffffffffffffffffffffffffffffffffffffffffffffffff90931692909217600955610120830151600a805461014086015161016087015160ff1671010000000000000000000000000000000000027fffffffffffffffffffffffffffff00ffffffffffffffffffffffffffffffffff67ffffffffffffffff9092166901000000000000000000027fffffffffffffffffffffffffffffff000000000000000000000000000000000090931694909516939093171791909116919091179055517f165999a4d7499227f20106b83c79a73315af2ecd639138d441db651c5f635e8690611191908390614a02565b855185518560ff16601f831115611f5f576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f746f6f206d616e79207369676e657273000000000000000000000000000000006044820152606401610bab565b80600003611fc9576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f66206d75737420626520706f73697469766500000000000000000000000000006044820152606401610bab565b818314612057576040517f89a61989000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f6f7261636c6520616464726573736573206f7574206f6620726567697374726160448201527f74696f6e000000000000000000000000000000000000000000000000000000006064820152608401610bab565b612062816003615687565b83116120ca576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f6661756c74792d6f7261636c65206620746f6f206869676800000000000000006044820152606401610bab565b6120d2612d40565b6040805160c0810182528a8152602081018a905260ff89169181018290526060810188905267ffffffffffffffff8716608082015260a08101869052906121199088613a7b565b600554156122ce57600554600090612133906001906151d1565b905060006005828154811061214a5761214a615201565b60009182526020822001546006805473ffffffffffffffffffffffffffffffffffffffff9092169350908490811061218457612184615201565b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff85811684526004909252604080842080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000908116909155929091168084529220805490911690556005805491925090806122045761220461569e565b60008281526020902081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90810180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055019055600680548061226d5761226d61569e565b60008281526020902081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90810180547fffffffffffffffffffffffff000000000000000000000000000000000000000016905501905550612119915050565b60005b815151811015612885578151805160009190839081106122f3576122f3615201565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1603612378576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f7369676e6572206d757374206e6f7420626520656d70747900000000000000006044820152606401610bab565b600073ffffffffffffffffffffffffffffffffffffffff16826020015182815181106123a6576123a6615201565b602002602001015173ffffffffffffffffffffffffffffffffffffffff160361242b576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f7472616e736d6974746572206d757374206e6f7420626520656d7074790000006044820152606401610bab565b6000600460008460000151848151811061244757612447615201565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff16825281019190915260400160002054610100900460ff16600281111561249157612491615634565b146124f8576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f7265706561746564207369676e657220616464726573730000000000000000006044820152606401610bab565b6040805180820190915260ff8216815260016020820152825180516004916000918590811061252957612529615201565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff168252818101929092526040016000208251815460ff9091167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0082168117835592840151919283917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000016176101008360028111156125ca576125ca615634565b0217905550600091506125da9050565b60046000846020015184815181106125f4576125f4615201565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff16825281019190915260400160002054610100900460ff16600281111561263e5761263e615634565b146126a5576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f7265706561746564207472616e736d69747465722061646472657373000000006044820152606401610bab565b6040805180820190915260ff8216815260208101600281525060046000846020015184815181106126d8576126d8615201565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff168252818101929092526040016000208251815460ff9091167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0082168117835592840151919283917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000161761010083600281111561277957612779615634565b02179055505082518051600592508390811061279757612797615201565b602090810291909101810151825460018101845560009384529282902090920180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909316929092179091558201518051600691908390811061281357612813615201565b60209081029190910181015182546001810184556000938452919092200180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9092169190911790558061287d81615230565b9150506122d1565b506040810151600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660ff909216919091179055600180547fffffffff00000000ffffffffffffffffffffffffffffffffffffffffffffffff8116780100000000000000000000000000000000000000000000000063ffffffff438116820292909217808555920481169291829160149161293d918491740100000000000000000000000000000000000000009004166156cd565b92506101000a81548163ffffffff021916908363ffffffff16021790555061299c4630600160149054906101000a900463ffffffff1663ffffffff16856000015186602001518760400151886060015189608001518a60a00151613a94565b600281905582518051600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1661010060ff9093169290920291909117905560015460208501516040808701516060880151608089015160a08a015193517f1591690b8638f5fb2dbec82ac741805ac5da8b45dc5263f4875b0496fdce4e0598612a53988b9891977401000000000000000000000000000000000000000090920463ffffffff169690959194919391926156ea565b60405180910390a15050505050505050505050565b604080516101808101825260085463ffffffff80821683526401000000008204811660208401526801000000000000000082048116838501526c0100000000000000000000000080830482166060850152700100000000000000000000000000000000830468ffffffffffffffffff9081166080860152790100000000000000000000000000000000000000000000000000840464ffffffffff1660a0808701919091527e0100000000000000000000000000000000000000000000000000000000000090940461ffff1660c08601526009547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff811660e08701527c01000000000000000000000000000000000000000000000000000000009004909216610100850152600a549182166101208501526901000000000000000000820467ffffffffffffffff166101408501527101000000000000000000000000000000000090910460ff16610160840152600c5484517ffeaf968c00000000000000000000000000000000000000000000000000000000815294516000958694859490930473ffffffffffffffffffffffffffffffffffffffff169263feaf968c926004808401938290030181865afa158015612c40573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c649190615181565b509350509250508042612c7791906151d1565b836020015163ffffffff16108015612c9957506000836020015163ffffffff16115b15612cc757505060e001517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16919050565b60008213612d04576040517f43d4cf6600000000000000000000000000000000000000000000000000000000815260048101839052602401610bab565b5092915050565b600a546000906107019060649061073b9068ffffffffffffffffff16612dc3565b612d34612d40565b612d3d81613b3f565b50565b60005473ffffffffffffffffffffffffffffffffffffffff163314612dc1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401610bab565b565b6000806000612dd0610917565b9092509050612e0882612de48360126155f9565b612def90600a6158a0565b612df99087615687565b612e0391906158af565b613c34565b949350505050565b600068ffffffffffffffffff821115612eab576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203760448201527f32206269747300000000000000000000000000000000000000000000000000006064820152608401610bab565b5090565b600c546bffffffffffffffffffffffff16600003612ec957565b6000612ed3610f9f565b80519091506000819003612f13576040517f30274b3a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600c54600090612f329083906bffffffffffffffffffffffff16615117565b905060005b82811015612ffd5781600b6000868481518110612f5657612f56615201565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282829054906101000a90046bffffffffffffffffffffffff16612fbe91906158c3565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff16021790555080612ff690615230565b9050612f37565b5061300882826158e8565b600c80546000906130289084906bffffffffffffffffffffffff16615142565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550505050565b612dc1612d40565b6040805161018081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810182905261012081018290526101408101829052610160810191909152604080516101808101825260085463ffffffff80821683526401000000008204811660208401526801000000000000000082048116938301939093526c0100000000000000000000000081048316606083015268ffffffffffffffffff70010000000000000000000000000000000082048116608084015264ffffffffff79010000000000000000000000000000000000000000000000000083041660a084015261ffff7e01000000000000000000000000000000000000000000000000000000000000909204821660c084018190526009547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff811660e08601527c0100000000000000000000000000000000000000000000000000000000900490941661010080850191909152600a5491821661012085015267ffffffffffffffff690100000000000000000083041661014085015260ff7101000000000000000000000000000000000090920491909116610160840152850151919291161115613272576040517fdada758700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006132818460000151610706565b9050600061328d612d0b565b905060006132a68660e001513a858960800151866138ed565b9050806bffffffffffffffffffffffff1686606001516bffffffffffffffffffffffff161015613302576040517ff4d678b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600084610100015163ffffffff164261331b9190615910565b905060003088604001518960a001518a60c00151600161333b9190615923565b8b5180516020918201206101008e015160e08f01516040516133ef98979695948c918c9132910173ffffffffffffffffffffffffffffffffffffffff9a8b168152988a1660208a015267ffffffffffffffff97881660408a0152959096166060880152608087019390935261ffff9190911660a086015263ffffffff90811660c08601526bffffffffffffffffffffffff9190911660e0850152919091166101008301529091166101208201526101400190565b6040516020818303038152906040528051906020012090506040518061018001604052808281526020013073ffffffffffffffffffffffffffffffffffffffff168152602001846bffffffffffffffffffffffff168152602001896040015173ffffffffffffffffffffffffffffffffffffffff1681526020018960a0015167ffffffffffffffff1681526020018960e0015163ffffffff168152602001896080015168ffffffffffffffffff1681526020018668ffffffffffffffffff168152602001876040015163ffffffff1664ffffffffff168152602001876060015163ffffffff1664ffffffffff1681526020018363ffffffff1681526020018568ffffffffffffffffff1681525096508660405160200161350f9190615944565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291815281516020928301206000938452600790925290912055509395945050505050565b60006135926040518060a0016040528060608152602001606081526020016060815260200160608152602001606081525090565b6000808080806135a4888a018a615a2e565b84519499509297509095509350915060ff168015806135c4575084518114155b806135d0575083518114155b806135dc575082518114155b806135e8575081518114155b1561364f576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f4669656c6473206d75737420626520657175616c206c656e67746800000000006044820152606401610bab565b60005b818110156136b55761368b87828151811061366f5761366f615201565b6020026020010151600090815260076020526040902054151590565b6136b55761369a6001836151d1565b81036136a557600198505b6136ae81615230565b9050613652565b50506040805160a0810182529586526020860194909452928401919091526060830152608082015290505b9250929050565b60006136f4826020615687565b6136ff856020615687565b61370b88610144615910565b6137159190615910565b61371f9190615910565b61372a906000615910565b9050368114613795576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f63616c6c64617461206c656e677468206d69736d6174636800000000000000006044820152606401610bab565b50505050505050565b80515160ff1660005b8181101561066b576000613850846000015183815181106137ca576137ca615201565b6020026020010151856020015184815181106137e8576137e8615201565b60200260200101518660400151858151811061380657613806615201565b60200260200101518760600151868151811061382457613824615201565b60200260200101518860800151878151811061384257613842615201565b602002602001015188613cd2565b9050600081600681111561386657613866615634565b14806138835750600181600681111561388157613881615634565b145b156138dc57835180518390811061389c5761389c615201565b60209081029190910181015160405133815290917fc708e0440951fd63499c0f7a73819b469ee5dd3ecc356c0ab4eb7f18389009d9910160405180910390a25b506138e681615230565b90506137a7565b600854600090790100000000000000000000000000000000000000000000000000900464ffffffffff1685101561394857600854790100000000000000000000000000000000000000000000000000900464ffffffffff1694505b600854600090612710906139629063ffffffff1688615687565b61396c91906158af565b6139769087615910565b60085490915060009088906139af9063ffffffff6c010000000000000000000000008204811691680100000000000000009004166156cd565b6139b991906156cd565b63ffffffff1690506000613a036000368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061419f92505050565b90506000613a2482613a158587615687565b613a1f9190615910565b6142e1565b905060008668ffffffffffffffffff168868ffffffffffffffffff168a68ffffffffffffffffff16613a5691906158c3565b613a6091906158c3565b9050613a6c81836158c3565b9b9a5050505050505050505050565b6000613a85610f9f565b511115610f4b57610f4b612eaf565b6000808a8a8a8a8a8a8a8a8a604051602001613ab899989796959493929190615b00565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291905280516020909101207dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e01000000000000000000000000000000000000000000000000000000000000179150509998505050505050505050565b3373ffffffffffffffffffffffffffffffffffffffff821603613bbe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401610bab565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b60006bffffffffffffffffffffffff821115612eab576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203960448201527f36206269747300000000000000000000000000000000000000000000000000006064820152608401610bab565b60008084806020019051810190613ce99190615bcc565b905060003a826101200151836101000151613d049190615ca6565b64ffffffffff16613d159190615687565b905060008460ff16613d5d6000368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061419f92505050565b613d6791906158af565b90506000613d78613a1f8385615910565b90506000613d853a6142e1565b90506000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663330605298e8e868b610160015168ffffffffffffffffff168c60e0015168ffffffffffffffffff168a613df591906158c3565b613dff91906158c3565b336040518061016001604052808f6000015181526020018f6020015173ffffffffffffffffffffffffffffffffffffffff1681526020018f604001516bffffffffffffffffffffffff1681526020018f6060015173ffffffffffffffffffffffffffffffffffffffff1681526020018f6080015167ffffffffffffffff1681526020018f60a0015163ffffffff1681526020018f60c0015168ffffffffffffffffff1681526020018f60e0015168ffffffffffffffffff1681526020018f610100015164ffffffffff1681526020018f610120015164ffffffffff1681526020018f610140015163ffffffff168152506040518763ffffffff1660e01b8152600401613f1096959493929190615cc4565b60408051808303816000875af1158015613f2e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613f529190615d40565b90925090506000826006811115613f6b57613f6b615634565b1480613f8857506001826006811115613f8657613f86615634565b145b1561418e5760008e815260076020526040812055613fa681856158c3565b336000908152600b602052604081208054909190613fd39084906bffffffffffffffffffffffff166158c3565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055508660e0015168ffffffffffffffffff16600c60008282829054906101000a90046bffffffffffffffffffffffff1661403991906158c3565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff16021790555086610160015168ffffffffffffffffff16600b6000614084614300565b73ffffffffffffffffffffffffffffffffffffffff1681526020810191909152604001600090812080549091906140ca9084906bffffffffffffffffffffffff166158c3565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055508d7f08a4a0761e3c98d288cb4af9342660f49550d83139fb3b762b70d34bed6273688487848b60e001518c60c001518d6101600151604051614185969594939291906bffffffffffffffffffffffff9687168152602081019590955292909416604084015268ffffffffffffffffff9081166060840152928316608083015290911660a082015260c00190565b60405180910390a25b509c9b505050505050505050505050565b6000466141ab81614371565b1561422757606c73ffffffffffffffffffffffffffffffffffffffff1663c6f7de0e6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156141fc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906142209190615d73565b9392505050565b61423081614394565b156142d85773420000000000000000000000000000000000000f73ffffffffffffffffffffffffffffffffffffffff166349948e0e84604051806080016040528060488152602001615dd960489139604051602001614290929190615d8c565b6040516020818303038152906040526040518263ffffffff1660e01b81526004016142bb91906144ec565b602060405180830381865afa1580156141fc573d6000803e3d6000fd5b50600092915050565b60006107586142ee612a68565b612df984670de0b6b3a7640000615687565b60003073ffffffffffffffffffffffffffffffffffffffff16638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561434d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107019190615dbb565b600061a4b1821480614385575062066eed82145b8061075857505062066eee1490565b6000600a8214806143a657506101a482145b806143b3575062aa37dc82145b806143bf575061210582145b806143cc575062014a3382145b8061075857505062014a341490565b604051806103e00160405280601f906020820280368337509192915050565b60008083601f84011261440c57600080fd5b50813567ffffffffffffffff81111561442457600080fd5b6020830191508360208285010111156136e057600080fd5b6000806020838503121561444f57600080fd5b823567ffffffffffffffff81111561446657600080fd5b614472858286016143fa565b90969095509350505050565b60005b83811015614499578181015183820152602001614481565b50506000910152565b600081518084526144ba81602086016020860161447e565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60208152600061422060208301846144a2565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051610180810167ffffffffffffffff81118282101715614552576145526144ff565b60405290565b604051610160810167ffffffffffffffff81118282101715614552576145526144ff565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156145c3576145c36144ff565b604052919050565b600082601f8301126145dc57600080fd5b813567ffffffffffffffff8111156145f6576145f66144ff565b61462760207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8401160161457c565b81815284602083860101111561463c57600080fd5b816020850160208301376000918101602001919091529392505050565b60006020828403121561466b57600080fd5b813567ffffffffffffffff81111561468257600080fd5b612e08848285016145cb565b73ffffffffffffffffffffffffffffffffffffffff81168114612d3d57600080fd5b803561142c8161468e565b6bffffffffffffffffffffffff81168114612d3d57600080fd5b803561142c816146bb565b600080604083850312156146f357600080fd5b82356146fe8161468e565b9150602083013561470e816146bb565b809150509250929050565b600081518084526020808501945080840160005b8381101561475f57815173ffffffffffffffffffffffffffffffffffffffff168752958201959082019060010161472d565b509495945050505050565b6020815260006142206020830184614719565b60006020828403121561478f57600080fd5b5035919050565b6000602082840312156147a857600080fd5b813567ffffffffffffffff8111156147bf57600080fd5b8201610160818503121561422057600080fd5b8051825260208101516147fd602084018273ffffffffffffffffffffffffffffffffffffffff169052565b50604081015161481d60408401826bffffffffffffffffffffffff169052565b506060810151614845606084018273ffffffffffffffffffffffffffffffffffffffff169052565b506080810151614861608084018267ffffffffffffffff169052565b5060a081015161487960a084018263ffffffff169052565b5060c081015161489660c084018268ffffffffffffffffff169052565b5060e08101516148b360e084018268ffffffffffffffffff169052565b506101008181015164ffffffffff81168483015250506101208181015164ffffffffff81168483015250506101408181015163ffffffff8116848301525b50505050565b610160810161075882846147d2565b60008083601f84011261491857600080fd5b50813567ffffffffffffffff81111561493057600080fd5b6020830191508360208260051b85010111156136e057600080fd5b60008060008060008060008060e0898b03121561496757600080fd5b606089018a81111561497857600080fd5b8998503567ffffffffffffffff8082111561499257600080fd5b61499e8c838d016143fa565b909950975060808b01359150808211156149b757600080fd5b6149c38c838d01614906565b909750955060a08b01359150808211156149dc57600080fd5b506149e98b828c01614906565b999c989b50969995989497949560c00135949350505050565b815163ffffffff16815261018081016020830151614a28602084018263ffffffff169052565b506040830151614a40604084018263ffffffff169052565b506060830151614a58606084018263ffffffff169052565b506080830151614a75608084018268ffffffffffffffffff169052565b5060a0830151614a8e60a084018264ffffffffff169052565b5060c0830151614aa460c084018261ffff169052565b5060e0830151614ad460e08401827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff169052565b506101008381015163ffffffff16908301526101208084015168ffffffffffffffffff16908301526101408084015167ffffffffffffffff16908301526101608084015160ff8116828501525b505092915050565b67ffffffffffffffff81168114612d3d57600080fd5b803561142c81614b29565b63ffffffff81168114612d3d57600080fd5b803561142c81614b4a565b600080600080600060808688031215614b7f57600080fd5b8535614b8a81614b29565b9450602086013567ffffffffffffffff811115614ba657600080fd5b614bb2888289016143fa565b9095509350506040860135614bc681614b4a565b949793965091946060013592915050565b68ffffffffffffffffff81168114612d3d57600080fd5b803561142c81614bd7565b64ffffffffff81168114612d3d57600080fd5b803561142c81614bf9565b803561ffff8116811461142c57600080fd5b80357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8116811461142c57600080fd5b60ff81168114612d3d57600080fd5b803561142c81614c55565b60006101808284031215614c8257600080fd5b614c8a61452e565b614c9383614b5c565b8152614ca160208401614b5c565b6020820152614cb260408401614b5c565b6040820152614cc360608401614b5c565b6060820152614cd460808401614bee565b6080820152614ce560a08401614c0c565b60a0820152614cf660c08401614c17565b60c0820152614d0760e08401614c29565b60e0820152610100614d1a818501614b5c565b90820152610120614d2c848201614bee565b90820152610140614d3e848201614b3f565b90820152610160614d50848201614c64565b908201529392505050565b600067ffffffffffffffff821115614d7557614d756144ff565b5060051b60200190565b600082601f830112614d9057600080fd5b81356020614da5614da083614d5b565b61457c565b82815260059290921b84018101918181019086841115614dc457600080fd5b8286015b84811015614de8578035614ddb8161468e565b8352918301918301614dc8565b509695505050505050565b60008060008060008060c08789031215614e0c57600080fd5b863567ffffffffffffffff80821115614e2457600080fd5b614e308a838b01614d7f565b97506020890135915080821115614e4657600080fd5b614e528a838b01614d7f565b9650614e6060408a01614c64565b95506060890135915080821115614e7657600080fd5b614e828a838b016145cb565b9450614e9060808a01614b3f565b935060a0890135915080821115614ea657600080fd5b50614eb389828a016145cb565b9150509295509295509295565b600060208284031215614ed257600080fd5b81356142208161468e565b600181811c90821680614ef157607f821691505b602082108103614f2a577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b601f82111561066b57600081815260208120601f850160051c81016020861015614f575750805b601f850160051c820191505b8181101561090f57828155600101614f63565b67ffffffffffffffff831115614f8e57614f8e6144ff565b614fa283614f9c8354614edd565b83614f30565b6000601f841160018114614ff45760008515614fbe5750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b17835561508a565b6000838152602090207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0861690835b828110156150435786850135825560209485019460019092019101615023565b508682101561507e577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b805161142c81614bd7565b6000602082840312156150ae57600080fd5b815161422081614bd7565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006bffffffffffffffffffffffff80841680615136576151366150b9565b92169190910492915050565b6bffffffffffffffffffffffff828116828216039080821115612d0457612d046150e8565b805169ffffffffffffffffffff8116811461142c57600080fd5b600080600080600060a0868803121561519957600080fd5b6151a286615167565b94506020860151935060408601519250606086015191506151c560808701615167565b90509295509295909350565b81810381811115610758576107586150e8565b6000602082840312156151f657600080fd5b815161422081614c55565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203615261576152616150e8565b5060010190565b6000610160823603121561527b57600080fd5b615283614558565b823567ffffffffffffffff81111561529a57600080fd5b6152a6368286016145cb565b825250602083013560208201526152bf604084016146b0565b60408201526152d0606084016146d5565b60608201526152e160808401614bee565b60808201526152f260a08401614b3f565b60a082015261530360c08401614b3f565b60c082015261531460e08401614b5c565b60e0820152610100615327818501614c17565b90820152610120615339848201614b3f565b9082015261014061534b8482016146b0565b9082015292915050565b60006020828403121561536757600080fd5b813561422081614b29565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18436030181126153a757600080fd5b83018035915067ffffffffffffffff8211156153c257600080fd5b6020019150368190038213156136e057600080fd5b6000602082840312156153e957600080fd5b61422082614c17565b60006020828403121561540457600080fd5b813561422081614b4a565b80518252602081015161543a602084018273ffffffffffffffffffffffffffffffffffffffff169052565b50604081015161545a60408401826bffffffffffffffffffffffff169052565b506060810151615482606084018273ffffffffffffffffffffffffffffffffffffffff169052565b50608081015161549e608084018267ffffffffffffffff169052565b5060a08101516154b660a084018263ffffffff169052565b5060c08101516154d360c084018268ffffffffffffffffff169052565b5060e08101516154f060e084018268ffffffffffffffffff169052565b506101008181015164ffffffffff9081169184019190915261012080830151909116908301526101408082015163ffffffff16908301526101608082015168ffffffffffffffffff8116828501526148f1565b73ffffffffffffffffffffffffffffffffffffffff8a8116825267ffffffffffffffff8a166020830152881660408201526102606060820181905281018690526000610280878982850137600083890182015261ffff8716608084015260a0830186905263ffffffff851660c0840152601f88017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01683010190506155eb60e083018461540f565b9a9950505050505050505050565b60ff8181168382160190811115610758576107586150e8565b600060ff831680615625576156256150b9565b8060ff84160491505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b8183823760009101908152919050565b828152606082602083013760800192915050565b8082028115828204841417610758576107586150e8565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b63ffffffff818116838216019080821115612d0457612d046150e8565b600061012063ffffffff808d1684528b6020850152808b1660408501525080606084015261571a8184018a614719565b9050828103608084015261572e8189614719565b905060ff871660a084015282810360c084015261574b81876144a2565b905067ffffffffffffffff851660e084015282810361010084015261577081856144a2565b9c9b505050505050505050505050565b600181815b808511156157d957817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048211156157bf576157bf6150e8565b808516156157cc57918102915b93841c9390800290615785565b509250929050565b6000826157f057506001610758565b816157fd57506000610758565b8160018114615813576002811461581d57615839565b6001915050610758565b60ff84111561582e5761582e6150e8565b50506001821b610758565b5060208310610133831016604e8410600b841016171561585c575081810a610758565b6158668383615780565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115615898576158986150e8565b029392505050565b600061422060ff8416836157e1565b6000826158be576158be6150b9565b500490565b6bffffffffffffffffffffffff818116838216019080821115612d0457612d046150e8565b6bffffffffffffffffffffffff818116838216028082169190828114614b2157614b216150e8565b80820180821115610758576107586150e8565b67ffffffffffffffff818116838216019080821115612d0457612d046150e8565b6101808101610758828461540f565b600082601f83011261596457600080fd5b81356020615974614da083614d5b565b82815260059290921b8401810191818101908684111561599357600080fd5b8286015b84811015614de85780358352918301918301615997565b600082601f8301126159bf57600080fd5b813560206159cf614da083614d5b565b82815260059290921b840181019181810190868411156159ee57600080fd5b8286015b84811015614de857803567ffffffffffffffff811115615a125760008081fd5b615a208986838b01016145cb565b8452509183019183016159f2565b600080600080600060a08688031215615a4657600080fd5b853567ffffffffffffffff80821115615a5e57600080fd5b615a6a89838a01615953565b96506020880135915080821115615a8057600080fd5b615a8c89838a016159ae565b95506040880135915080821115615aa257600080fd5b615aae89838a016159ae565b94506060880135915080821115615ac457600080fd5b615ad089838a016159ae565b93506080880135915080821115615ae657600080fd5b50615af3888289016159ae565b9150509295509295909350565b60006101208b835273ffffffffffffffffffffffffffffffffffffffff8b16602084015267ffffffffffffffff808b166040850152816060850152615b478285018b614719565b91508382036080850152615b5b828a614719565b915060ff881660a085015283820360c0850152615b7882886144a2565b90861660e0850152838103610100850152905061577081856144a2565b805161142c8161468e565b805161142c816146bb565b805161142c81614b29565b805161142c81614b4a565b805161142c81614bf9565b60006101808284031215615bdf57600080fd5b615be761452e565b82518152615bf760208401615b95565b6020820152615c0860408401615ba0565b6040820152615c1960608401615b95565b6060820152615c2a60808401615bab565b6080820152615c3b60a08401615bb6565b60a0820152615c4c60c08401615091565b60c0820152615c5d60e08401615091565b60e0820152610100615c70818501615bc1565b90820152610120615c82848201615bc1565b90820152610140615c94848201615bb6565b90820152610160614d50848201615091565b64ffffffffff818116838216019080821115612d0457612d046150e8565b6000610200808352615cd88184018a6144a2565b90508281036020840152615cec81896144a2565b6bffffffffffffffffffffffff88811660408601528716606085015273ffffffffffffffffffffffffffffffffffffffff861660808501529150615d35905060a08301846147d2565b979650505050505050565b60008060408385031215615d5357600080fd5b825160078110615d6257600080fd5b602084015190925061470e816146bb565b600060208284031215615d8557600080fd5b5051919050565b60008351615d9e81846020880161447e565b835190830190615db281836020880161447e565b01949350505050565b600060208284031215615dcd57600080fd5b81516142208161468e56fe307866666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666a164736f6c6343000813000a", + ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"fulfillmentGasPriceOverEstimationBP\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"feedStalenessSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasOverheadBeforeCallback\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasOverheadAfterCallback\",\"type\":\"uint32\"},{\"internalType\":\"uint40\",\"name\":\"minimumEstimateGasPriceWei\",\"type\":\"uint40\"},{\"internalType\":\"uint16\",\"name\":\"maxSupportedRequestDataVersion\",\"type\":\"uint16\"},{\"internalType\":\"uint64\",\"name\":\"fallbackUsdPerUnitLink\",\"type\":\"uint64\"},{\"internalType\":\"uint8\",\"name\":\"fallbackUsdPerUnitLinkDecimals\",\"type\":\"uint8\"},{\"internalType\":\"uint224\",\"name\":\"fallbackNativePerUnitLink\",\"type\":\"uint224\"},{\"internalType\":\"uint32\",\"name\":\"requestTimeoutSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"donFee\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"operationFee\",\"type\":\"uint16\"}],\"internalType\":\"structFunctionsBillingConfig\",\"name\":\"config\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"linkToNativeFeed\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"linkToUsdFeed\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"EmptyPublicKey\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InconsistentReportData\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientBalance\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidCalldata\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"message\",\"type\":\"string\"}],\"name\":\"InvalidConfig\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"int256\",\"name\":\"linkWei\",\"type\":\"int256\"}],\"name\":\"InvalidLinkWeiPrice\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidSubscription\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"int256\",\"name\":\"usdLink\",\"type\":\"int256\"}],\"name\":\"InvalidUsdLinkPrice\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"MustBeSubOwner\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NoTransmittersSet\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByRouter\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByRouterOwner\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PaymentTooLarge\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"message\",\"type\":\"string\"}],\"name\":\"ReportInvalid\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RouterMustBeSet\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnauthorizedPublicKeyChange\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnauthorizedSender\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnsupportedRequestDataVersion\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"requestId\",\"type\":\"bytes32\"}],\"name\":\"CommitmentDeleted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"previousConfigBlockNumber\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"configCount\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"signers\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"transmitters\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"onchainConfig\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"offchainConfigVersion\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"}],\"name\":\"ConfigSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"fulfillmentGasPriceOverEstimationBP\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"feedStalenessSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasOverheadBeforeCallback\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasOverheadAfterCallback\",\"type\":\"uint32\"},{\"internalType\":\"uint40\",\"name\":\"minimumEstimateGasPriceWei\",\"type\":\"uint40\"},{\"internalType\":\"uint16\",\"name\":\"maxSupportedRequestDataVersion\",\"type\":\"uint16\"},{\"internalType\":\"uint64\",\"name\":\"fallbackUsdPerUnitLink\",\"type\":\"uint64\"},{\"internalType\":\"uint8\",\"name\":\"fallbackUsdPerUnitLinkDecimals\",\"type\":\"uint8\"},{\"internalType\":\"uint224\",\"name\":\"fallbackNativePerUnitLink\",\"type\":\"uint224\"},{\"internalType\":\"uint32\",\"name\":\"requestTimeoutSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"donFee\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"operationFee\",\"type\":\"uint16\"}],\"indexed\":false,\"internalType\":\"structFunctionsBillingConfig\",\"name\":\"config\",\"type\":\"tuple\"}],\"name\":\"ConfigUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"requestId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"requestingContract\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"requestInitiator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"subscriptionId\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"subscriptionOwner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"dataVersion\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"flags\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"callbackGasLimit\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"requestId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"coordinator\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"estimatedTotalCostJuels\",\"type\":\"uint96\"},{\"internalType\":\"address\",\"name\":\"client\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"subscriptionId\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint72\",\"name\":\"adminFee\",\"type\":\"uint72\"},{\"internalType\":\"uint72\",\"name\":\"donFee\",\"type\":\"uint72\"},{\"internalType\":\"uint40\",\"name\":\"gasOverheadBeforeCallback\",\"type\":\"uint40\"},{\"internalType\":\"uint40\",\"name\":\"gasOverheadAfterCallback\",\"type\":\"uint40\"},{\"internalType\":\"uint32\",\"name\":\"timeoutTimestamp\",\"type\":\"uint32\"},{\"internalType\":\"uint72\",\"name\":\"operationFee\",\"type\":\"uint72\"}],\"indexed\":false,\"internalType\":\"structFunctionsResponse.CommitmentWithOperationFee\",\"name\":\"commitment\",\"type\":\"tuple\"}],\"name\":\"OracleRequest\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"requestId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"transmitter\",\"type\":\"address\"}],\"name\":\"OracleResponse\",\"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\":\"bytes32\",\"name\":\"requestId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"juelsPerGas\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"l1FeeShareWei\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"callbackCostJuels\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint72\",\"name\":\"donFeeJuels\",\"type\":\"uint72\"},{\"indexed\":false,\"internalType\":\"uint72\",\"name\":\"adminFeeJuels\",\"type\":\"uint72\"},{\"indexed\":false,\"internalType\":\"uint72\",\"name\":\"operationFeeJuels\",\"type\":\"uint72\"}],\"name\":\"RequestBilled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"epoch\",\"type\":\"uint32\"}],\"name\":\"Transmitted\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"requestId\",\"type\":\"bytes32\"}],\"name\":\"deleteCommitment\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"subscriptionId\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"gasPriceWei\",\"type\":\"uint256\"}],\"name\":\"estimateCost\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAdminFee\",\"outputs\":[{\"internalType\":\"uint72\",\"name\":\"\",\"type\":\"uint72\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getConfig\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"fulfillmentGasPriceOverEstimationBP\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"feedStalenessSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasOverheadBeforeCallback\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasOverheadAfterCallback\",\"type\":\"uint32\"},{\"internalType\":\"uint40\",\"name\":\"minimumEstimateGasPriceWei\",\"type\":\"uint40\"},{\"internalType\":\"uint16\",\"name\":\"maxSupportedRequestDataVersion\",\"type\":\"uint16\"},{\"internalType\":\"uint64\",\"name\":\"fallbackUsdPerUnitLink\",\"type\":\"uint64\"},{\"internalType\":\"uint8\",\"name\":\"fallbackUsdPerUnitLinkDecimals\",\"type\":\"uint8\"},{\"internalType\":\"uint224\",\"name\":\"fallbackNativePerUnitLink\",\"type\":\"uint224\"},{\"internalType\":\"uint32\",\"name\":\"requestTimeoutSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"donFee\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"operationFee\",\"type\":\"uint16\"}],\"internalType\":\"structFunctionsBillingConfig\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"getDONFee\",\"outputs\":[{\"internalType\":\"uint72\",\"name\":\"\",\"type\":\"uint72\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getDONPublicKey\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getOperationFee\",\"outputs\":[{\"internalType\":\"uint72\",\"name\":\"\",\"type\":\"uint72\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getThresholdPublicKey\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getUsdPerUnitLink\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getWeiPerUnitLink\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestConfigDetails\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"configCount\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blockNumber\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestConfigDigestAndEpoch\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"scanLogs\",\"type\":\"bool\"},{\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"epoch\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"oracleWithdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"oracleWithdrawAll\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_signers\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"_transmitters\",\"type\":\"address[]\"},{\"internalType\":\"uint8\",\"name\":\"_f\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"_onchainConfig\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"_offchainConfigVersion\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"_offchainConfig\",\"type\":\"bytes\"}],\"name\":\"setConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"donPublicKey\",\"type\":\"bytes\"}],\"name\":\"setDONPublicKey\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"thresholdPublicKey\",\"type\":\"bytes\"}],\"name\":\"setThresholdPublicKey\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"flags\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"requestingContract\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"availableBalance\",\"type\":\"uint96\"},{\"internalType\":\"uint72\",\"name\":\"adminFee\",\"type\":\"uint72\"},{\"internalType\":\"uint64\",\"name\":\"subscriptionId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"initiatedRequests\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"dataVersion\",\"type\":\"uint16\"},{\"internalType\":\"uint64\",\"name\":\"completedRequests\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"subscriptionOwner\",\"type\":\"address\"}],\"internalType\":\"structFunctionsResponse.RequestMeta\",\"name\":\"request\",\"type\":\"tuple\"}],\"name\":\"startRequest\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"requestId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"coordinator\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"estimatedTotalCostJuels\",\"type\":\"uint96\"},{\"internalType\":\"address\",\"name\":\"client\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"subscriptionId\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint72\",\"name\":\"adminFee\",\"type\":\"uint72\"},{\"internalType\":\"uint72\",\"name\":\"donFee\",\"type\":\"uint72\"},{\"internalType\":\"uint40\",\"name\":\"gasOverheadBeforeCallback\",\"type\":\"uint40\"},{\"internalType\":\"uint40\",\"name\":\"gasOverheadAfterCallback\",\"type\":\"uint40\"},{\"internalType\":\"uint32\",\"name\":\"timeoutTimestamp\",\"type\":\"uint32\"}],\"internalType\":\"structFunctionsResponse.Commitment\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[3]\",\"name\":\"reportContext\",\"type\":\"bytes32[3]\"},{\"internalType\":\"bytes\",\"name\":\"report\",\"type\":\"bytes\"},{\"internalType\":\"bytes32[]\",\"name\":\"rs\",\"type\":\"bytes32[]\"},{\"internalType\":\"bytes32[]\",\"name\":\"ss\",\"type\":\"bytes32[]\"},{\"internalType\":\"bytes32\",\"name\":\"rawVs\",\"type\":\"bytes32\"}],\"name\":\"transmit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"transmitters\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"typeAndVersion\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"fulfillmentGasPriceOverEstimationBP\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"feedStalenessSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasOverheadBeforeCallback\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasOverheadAfterCallback\",\"type\":\"uint32\"},{\"internalType\":\"uint40\",\"name\":\"minimumEstimateGasPriceWei\",\"type\":\"uint40\"},{\"internalType\":\"uint16\",\"name\":\"maxSupportedRequestDataVersion\",\"type\":\"uint16\"},{\"internalType\":\"uint64\",\"name\":\"fallbackUsdPerUnitLink\",\"type\":\"uint64\"},{\"internalType\":\"uint8\",\"name\":\"fallbackUsdPerUnitLinkDecimals\",\"type\":\"uint8\"},{\"internalType\":\"uint224\",\"name\":\"fallbackNativePerUnitLink\",\"type\":\"uint224\"},{\"internalType\":\"uint32\",\"name\":\"requestTimeoutSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"donFee\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"operationFee\",\"type\":\"uint16\"}],\"internalType\":\"structFunctionsBillingConfig\",\"name\":\"config\",\"type\":\"tuple\"}],\"name\":\"updateConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x60a06040523480156200001157600080fd5b506040516200619f3803806200619f8339810160408190526200003491620004db565b83838383833380600081620000905760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000c357620000c3816200014e565b5050506001600160a01b038116620000ee57604051632530e88560e11b815260040160405180910390fd5b6001600160a01b03908116608052600c80546001600160601b03166c0100000000000000000000000085841602179055600d80546001600160a01b0319169183169190911790556200014083620001f9565b505050505050505062000742565b336001600160a01b03821603620001a85760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000087565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b620002036200039e565b80516008805460208401516040808601516060870151608088015160a089015160c08a015160e08b015160ff16600160f81b026001600160f81b036001600160401b03909216600160b81b02919091166001600160b81b0361ffff938416600160a81b0261ffff60a81b1964ffffffffff909616600160801b029590951666ffffffffffffff60801b1963ffffffff9788166c010000000000000000000000000263ffffffff60601b19998916680100000000000000000299909916600160401b600160801b03199b8916640100000000026001600160401b0319909d169e89169e909e179b909b17999099169b909b1795909517979097169590951717969096161792909217909255610100840151610120850151909316600160e01b026001600160e01b0390931692909217600955610140830151600a80546101608601518416620100000263ffffffff19919091169290931691909117919091179055517f2e2c8535dcc25459d519f2300c114d2d2128bf6399722d04eca078461a3bf33a906200039390839062000639565b60405180910390a150565b620003a8620003aa565b565b6000546001600160a01b03163314620003a85760405162461bcd60e51b815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000604482015260640162000087565b80516001600160a01b03811681146200041e57600080fd5b919050565b60405161018081016001600160401b03811182821017156200045557634e487b7160e01b600052604160045260246000fd5b60405290565b805163ffffffff811681146200041e57600080fd5b805164ffffffffff811681146200041e57600080fd5b805161ffff811681146200041e57600080fd5b80516001600160401b03811681146200041e57600080fd5b805160ff811681146200041e57600080fd5b80516001600160e01b03811681146200041e57600080fd5b6000806000808486036101e0811215620004f457600080fd5b620004ff8662000406565b945061018080601f19830112156200051657600080fd5b6200052062000423565b915062000530602088016200045b565b825262000540604088016200045b565b602083015262000553606088016200045b565b604083015262000566608088016200045b565b60608301526200057960a0880162000470565b60808301526200058c60c0880162000486565b60a08301526200059f60e0880162000499565b60c0830152610100620005b4818901620004b1565b60e0840152610120620005c9818a01620004c3565b828501526101409150620005df828a016200045b565b90840152610160620005f389820162000486565b8285015262000604838a0162000486565b90840152509093506200061d90506101a0860162000406565b91506200062e6101c0860162000406565b905092959194509250565b815163ffffffff1681526101808101602083015162000660602084018263ffffffff169052565b50604083015162000679604084018263ffffffff169052565b50606083015162000692606084018263ffffffff169052565b506080830151620006ac608084018264ffffffffff169052565b5060a0830151620006c360a084018261ffff169052565b5060c0830151620006df60c08401826001600160401b03169052565b5060e0830151620006f560e084018260ff169052565b50610100838101516001600160e01b0316908301526101208084015163ffffffff16908301526101408084015161ffff908116918401919091526101609384015116929091019190915290565b608051615a1762000788600039600081816106670152818161083201528181610d1301528181610fa7015281816110bd01528181611bc7015261397f0152615a176000f3fe608060405234801561001057600080fd5b50600436106101a35760003560e01c806385b214cf116100ee578063c3f909d411610097578063e3d0e71211610071578063e3d0e712146105ca578063e4ddcea6146105dd578063ec2c65c1146105f3578063f2fde38b146105fb57600080fd5b8063c3f909d4146103c4578063d227d24514610592578063d328a91e146105c257600080fd5b8063afcb95d7116100c8578063afcb95d71461037e578063b1dc65a41461039e578063ba9c924d146103b157600080fd5b806385b214cf146103235780638da5cb5b14610336578063a631571e1461035e57600080fd5b806379ba509711610150578063814118341161012a578063814118341461029957806381f1b938146102ae57806381ff7048146102b657600080fd5b806379ba5097146102765780637d4807871461027e5780637f15e1661461028657600080fd5b806359b5b7ac1161018157806359b5b7ac1461023157806366316d8d146102445780637212762f1461025757600080fd5b8063083a5466146101a8578063181f5a77146101bd5780632a905ccc1461020f575b600080fd5b6101bb6101b636600461402f565b61060e565b005b6101f96040518060400160405280601c81526020017f46756e6374696f6e7320436f6f7264696e61746f722076322e302e300000000081525081565b60405161020691906140df565b60405180910390f35b610217610663565b60405168ffffffffffffffffff9091168152602001610206565b61021761023f36600461424c565b6106f9565b6101bb6102523660046142d3565b610736565b61025f6108ef565b6040805192835260ff909116602083015201610206565b6101bb610b02565b6101bb610bff565b6101bb61029436600461402f565b610dff565b6102a1610e4f565b604051610206919061435d565b6101f9610ebe565b61030060015460025463ffffffff74010000000000000000000000000000000000000000830481169378010000000000000000000000000000000000000000000000009093041691565b6040805163ffffffff948516815293909216602084015290820152606001610206565b6101bb610331366004614370565b610f8f565b60005460405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610206565b61037161036c366004614389565b61104c565b60405161020691906144ea565b604080516001815260006020820181905291810191909152606001610206565b6101bb6103ac36600461453e565b6112e1565b6101bb6103bf3660046146a9565b6118f8565b6105856040805161018081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e0810182905261010081018290526101208101829052610140810182905261016081019190915250604080516101808101825260085463ffffffff80821683526401000000008204811660208401526801000000000000000082048116938301939093526c01000000000000000000000000810483166060830152700100000000000000000000000000000000810464ffffffffff1660808301527501000000000000000000000000000000000000000000810461ffff90811660a084015277010000000000000000000000000000000000000000000000820467ffffffffffffffff1660c08401527f010000000000000000000000000000000000000000000000000000000000000090910460ff1660e08301526009547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff81166101008401527c01000000000000000000000000000000000000000000000000000000009004909216610120820152600a5480831661014083015262010000900490911661016082015290565b6040516102069190614795565b6105a56105a03660046148b2565b611bc3565b6040516bffffffffffffffffffffffff9091168152602001610206565b6101f9611d31565b6101bb6105d83660046149ba565b611d88565b6105e5612904565b604051908152602001610206565b610217612a48565b6101bb610609366004614a87565b612a68565b610616612a7c565b6000819003610651576040517f4f42be3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600f61065e828483614b37565b505050565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16632a905ccc6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f49190614c74565b905090565b600a54600090610730906064906107139061ffff16612aff565b61071d9190614cef565b6bffffffffffffffffffffffff16612b4c565b92915050565b61073e612beb565b806bffffffffffffffffffffffff166000036107785750336000908152600b60205260409020546bffffffffffffffffffffffff166107d2565b336000908152600b60205260409020546bffffffffffffffffffffffff808316911610156107d2576040517ff4d678b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336000908152600b6020526040812080548392906107ff9084906bffffffffffffffffffffffff16614d1a565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055506108547f000000000000000000000000000000000000000000000000000000000000000090565b6040517f66316d8d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301526bffffffffffffffffffffffff8416602483015291909116906366316d8d90604401600060405180830381600087803b1580156108d357600080fd5b505af11580156108e7573d6000803e3d6000fd5b505050505050565b600080600080600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015610962573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109869190614d60565b5093505092505080426109999190614db0565b600854640100000000900463ffffffff161080156109c65750600854640100000000900463ffffffff1615155b15610a2357505060085477010000000000000000000000000000000000000000000000810467ffffffffffffffff16937f010000000000000000000000000000000000000000000000000000000000000090910460ff1692509050565b60008213610a65576040517f56b22ab8000000000000000000000000000000000000000000000000000000008152600481018390526024015b60405180910390fd5b600d54604080517f313ce5670000000000000000000000000000000000000000000000000000000081529051849273ffffffffffffffffffffffffffffffffffffffff169163313ce5679160048083019260209291908290030181865afa158015610ad4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610af89190614dc3565b9350935050509091565b60015473ffffffffffffffffffffffffffffffffffffffff163314610b83576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e6572000000000000000000006044820152606401610a5c565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b610c07612d97565b610c0f612beb565b6000610c19610e4f565b905060005b8151811015610dfb576000600b6000848481518110610c3f57610c3f614de0565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff168252810191909152604001600020546bffffffffffffffffffffffff1690508015610dea576000600b6000858581518110610c9e57610c9e614de0565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550610d357f000000000000000000000000000000000000000000000000000000000000000090565b73ffffffffffffffffffffffffffffffffffffffff166366316d8d848481518110610d6257610d62614de0565b6020026020010151836040518363ffffffff1660e01b8152600401610db792919073ffffffffffffffffffffffffffffffffffffffff9290921682526bffffffffffffffffffffffff16602082015260400190565b600060405180830381600087803b158015610dd157600080fd5b505af1158015610de5573d6000803e3d6000fd5b505050505b50610df481614e0f565b9050610c1e565b5050565b610e07612a7c565b6000819003610e42576040517f4f42be3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600e61065e828483614b37565b60606006805480602002602001604051908101604052809291908181526020018280548015610eb457602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311610e89575b5050505050905090565b6060600f8054610ecd90614aa4565b9050600003610f08576040517f4f42be3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600f8054610f1590614aa4565b80601f0160208091040260200160405190810160405280929190818152602001828054610f4190614aa4565b8015610eb45780601f10610f6357610100808354040283529160200191610eb4565b820191906000526020600020905b815481529060010190602001808311610f7157509395945050505050565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610ffe576040517fc41a5b0900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008181526007602052604080822091909155517f8a4b97add3359bd6bcf5e82874363670eb5ad0f7615abddbd0ed0a3a98f0f416906110419083815260200190565b60405180910390a150565b6040805161016081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810182905261012081018290526101408101919091523373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614611114576040517fc41a5b0900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061112761112284614e52565b612d9f565b90506111396060840160408501614a87565b815173ffffffffffffffffffffffffffffffffffffffff91909116907f718684b6c135c1277575a7b5c7365bc9587d5ebfd899230d5fa11360f6143bfb3261118760c0880160a08901614f3f565b61119961016089016101408a01614a87565b6111a38980614f5c565b6111b56101208c016101008d01614fc1565b60208c01356111cb6101008e0160e08f01614fdc565b8b6040516111e19998979695949392919061512d565b60405180910390a360405180610160016040528082600001518152602001826020015173ffffffffffffffffffffffffffffffffffffffff16815260200182604001516bffffffffffffffffffffffff168152602001826060015173ffffffffffffffffffffffffffffffffffffffff168152602001826080015167ffffffffffffffff1681526020018260a0015163ffffffff1681526020018260c0015168ffffffffffffffffff1681526020018260e0015168ffffffffffffffffff16815260200182610100015164ffffffffff16815260200182610120015164ffffffffff16815260200182610140015163ffffffff168152509150505b919050565b6000806112ee8989613163565b9150915081156112ff5750506118ee565b604080518b3580825262ffffff6020808f0135600881901c9290921690840152909290917fb04e63db38c49950639fa09d29872f21f5d49d614f3a969d8adf3d4b52e41a62910160405180910390a161135c8b8b8b8b8b8b6132ec565b60035460009060029061137a9060ff808216916101009004166151e3565b61138491906151fc565b61138f9060016151e3565b60ff1690508881146113fd576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f77726f6e67206e756d626572206f66207369676e6174757265730000000000006044820152606401610a5c565b88871461148c576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f7265706f727420727320616e64207373206d757374206265206f66206571756160448201527f6c206c656e6774680000000000000000000000000000000000000000000000006064820152608401610a5c565b3360009081526004602090815260408083208151808301909252805460ff808216845292939192918401916101009091041660028111156114cf576114cf61521e565b60028111156114e0576114e061521e565b90525090506002816020015160028111156114fd576114fd61521e565b1415801561154657506006816000015160ff168154811061152057611520614de0565b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff163314155b156115ad576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f756e617574686f72697a6564207472616e736d697474657200000000000000006044820152606401610a5c565b505050506115b9613fce565b60008a8a6040516115cb92919061524d565b6040519081900381206115e2918e9060200161525d565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181528282528051602091820120838301909252600080845290830152915060005b898110156118de57600060018489846020811061164b5761164b614de0565b61165891901a601b6151e3565b8e8e8681811061166a5761166a614de0565b905060200201358d8d8781811061168357611683614de0565b90506020020135604051600081526020016040526040516116c0949392919093845260ff9290921660208401526040830152606082015260800190565b6020604051602081039080840390855afa1580156116e2573d6000803e3d6000fd5b5050604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081015173ffffffffffffffffffffffffffffffffffffffff811660009081526004602090815290849020838501909452835460ff808216855292965092945084019161010090041660028111156117625761176261521e565b60028111156117735761177361521e565b90525092506001836020015160028111156117905761179061521e565b146117f7576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f61646472657373206e6f7420617574686f72697a656420746f207369676e00006044820152606401610a5c565b8251600090869060ff16601f811061181157611811614de0565b602002015173ffffffffffffffffffffffffffffffffffffffff1614611893576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f6e6f6e2d756e69717565207369676e61747572650000000000000000000000006044820152606401610a5c565b8085846000015160ff16601f81106118ad576118ad614de0565b73ffffffffffffffffffffffffffffffffffffffff9092166020929092020152506118d781614e0f565b905061162c565b5050506118ea826133a3565b5050505b5050505050505050565b611900612d97565b80516008805460208401516040808601516060870151608088015160a089015160c08a015160e08b015160ff167f0100000000000000000000000000000000000000000000000000000000000000027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff67ffffffffffffffff90921677010000000000000000000000000000000000000000000000029190911676ffffffffffffffffffffffffffffffffffffffffffffff61ffff9384167501000000000000000000000000000000000000000000027fffffffffffffffffff0000ffffffffffffffffffffffffffffffffffffffffff64ffffffffff90961670010000000000000000000000000000000002959095167fffffffffffffffffff00000000000000ffffffffffffffffffffffffffffffff63ffffffff9788166c01000000000000000000000000027fffffffffffffffffffffffffffffffff00000000ffffffffffffffffffffffff9989166801000000000000000002999099167fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff9b8916640100000000027fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000909d169e89169e909e179b909b17999099169b909b17959095179790971695909517179690961617929092179092556101008401516101208501519093167c0100000000000000000000000000000000000000000000000000000000027bffffffffffffffffffffffffffffffffffffffffffffffffffffffff90931692909217600955610140830151600a8054610160860151841662010000027fffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000919091169290931691909117919091179055517f2e2c8535dcc25459d519f2300c114d2d2128bf6399722d04eca078461a3bf33a90611041908390614795565b60007f00000000000000000000000000000000000000000000000000000000000000006040517f10fc49c100000000000000000000000000000000000000000000000000000000815267ffffffffffffffff8816600482015263ffffffff8516602482015273ffffffffffffffffffffffffffffffffffffffff91909116906310fc49c19060440160006040518083038186803b158015611c6357600080fd5b505afa158015611c77573d6000803e3d6000fd5b5050505066038d7ea4c68000821115611cbc576040517f8129bbcd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000611cc6610663565b90506000611d0987878080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506106f992505050565b90506000611d15612a48565b9050611d2486868486856134f2565b9998505050505050505050565b6060600e8054611d4090614aa4565b9050600003611d7b576040517f4f42be3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600e8054610f1590614aa4565b855185518560ff16601f831115611dfb576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f746f6f206d616e79207369676e657273000000000000000000000000000000006044820152606401610a5c565b80600003611e65576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f66206d75737420626520706f73697469766500000000000000000000000000006044820152606401610a5c565b818314611ef3576040517f89a61989000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f6f7261636c6520616464726573736573206f7574206f6620726567697374726160448201527f74696f6e000000000000000000000000000000000000000000000000000000006064820152608401610a5c565b611efe816003615271565b8311611f66576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f6661756c74792d6f7261636c65206620746f6f206869676800000000000000006044820152606401610a5c565b611f6e612a7c565b6040805160c0810182528a8152602081018a905260ff89169181018290526060810188905267ffffffffffffffff8716608082015260a0810186905290611fb5908861366e565b6005541561216a57600554600090611fcf90600190614db0565b9050600060058281548110611fe657611fe6614de0565b60009182526020822001546006805473ffffffffffffffffffffffffffffffffffffffff9092169350908490811061202057612020614de0565b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff85811684526004909252604080842080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000908116909155929091168084529220805490911690556005805491925090806120a0576120a0615288565b60008281526020902081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90810180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055019055600680548061210957612109615288565b60008281526020902081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90810180547fffffffffffffffffffffffff000000000000000000000000000000000000000016905501905550611fb5915050565b60005b8151518110156127215781518051600091908390811061218f5761218f614de0565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1603612214576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f7369676e6572206d757374206e6f7420626520656d70747900000000000000006044820152606401610a5c565b600073ffffffffffffffffffffffffffffffffffffffff168260200151828151811061224257612242614de0565b602002602001015173ffffffffffffffffffffffffffffffffffffffff16036122c7576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f7472616e736d6974746572206d757374206e6f7420626520656d7074790000006044820152606401610a5c565b600060046000846000015184815181106122e3576122e3614de0565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff16825281019190915260400160002054610100900460ff16600281111561232d5761232d61521e565b14612394576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f7265706561746564207369676e657220616464726573730000000000000000006044820152606401610a5c565b6040805180820190915260ff821681526001602082015282518051600491600091859081106123c5576123c5614de0565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff168252818101929092526040016000208251815460ff9091167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0082168117835592840151919283917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000016176101008360028111156124665761246661521e565b0217905550600091506124769050565b600460008460200151848151811061249057612490614de0565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff16825281019190915260400160002054610100900460ff1660028111156124da576124da61521e565b14612541576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f7265706561746564207472616e736d69747465722061646472657373000000006044820152606401610a5c565b6040805180820190915260ff82168152602081016002815250600460008460200151848151811061257457612574614de0565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff168252818101929092526040016000208251815460ff9091167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0082168117835592840151919283917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000016176101008360028111156126155761261561521e565b02179055505082518051600592508390811061263357612633614de0565b602090810291909101810151825460018101845560009384529282902090920180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff90931692909217909155820151805160069190839081106126af576126af614de0565b60209081029190910181015182546001810184556000938452919092200180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9092169190911790558061271981614e0f565b91505061216d565b506040810151600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660ff909216919091179055600180547fffffffff00000000ffffffffffffffffffffffffffffffffffffffffffffffff8116780100000000000000000000000000000000000000000000000063ffffffff43811682029290921780855592048116929182916014916127d9918491740100000000000000000000000000000000000000009004166152b7565b92506101000a81548163ffffffff021916908363ffffffff1602179055506128384630600160149054906101000a900463ffffffff1663ffffffff16856000015186602001518760400151886060015189608001518a60a00151613687565b600281905582518051600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1661010060ff9093169290920291909117905560015460208501516040808701516060880151608089015160a08a015193517f1591690b8638f5fb2dbec82ac741805ac5da8b45dc5263f4875b0496fdce4e05986128ef988b9891977401000000000000000000000000000000000000000090920463ffffffff169690959194919391926152d4565b60405180910390a15050505050505050505050565b6000806000600c8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015612974573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129989190614d60565b5093505092505080426129ab9190614db0565b600854640100000000900463ffffffff161080156129d85750600854640100000000900463ffffffff1615155b15612a055750506009547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16919050565b60008213612a42576040517f43d4cf6600000000000000000000000000000000000000000000000000000000815260048101839052602401610a5c565b50919050565b600a546000906106f4906064906107139062010000900461ffff16612aff565b612a70612a7c565b612a7981613732565b50565b60005473ffffffffffffffffffffffffffffffffffffffff163314612afd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401610a5c565b565b6000806000612b0c6108ef565b9092509050612b4482612b208360126151e3565b612b2b90600a61548a565b612b359087615271565b612b3f9190615499565b613827565b949350505050565b600068ffffffffffffffffff821115612be7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203760448201527f32206269747300000000000000000000000000000000000000000000000000006064820152608401610a5c565b5090565b600c546bffffffffffffffffffffffff16600003612c0557565b6000612c0f610e4f565b80519091506000819003612c4f576040517f30274b3a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600c54600090612c6e9083906bffffffffffffffffffffffff16614cef565b905060005b82811015612d395781600b6000868481518110612c9257612c92614de0565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282829054906101000a90046bffffffffffffffffffffffff16612cfa91906154ad565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff16021790555080612d3290614e0f565b9050612c73565b50612d4482826154d2565b600c8054600090612d649084906bffffffffffffffffffffffff16614d1a565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550505050565b612afd612a7c565b6040805161018081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e0810182905261010081018290526101208101829052610140810182905261016081019190915260085461010083015161ffff7501000000000000000000000000000000000000000000909204821691161115612e62576040517fdada758700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000612e7183600001516106f9565b90506000612e7d612a48565b90506000612e968560e001513a858860800151866134f2565b9050806bffffffffffffffffffffffff1685606001516bffffffffffffffffffffffff161015612ef2576040517ff4d678b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600954600090612f28907c0100000000000000000000000000000000000000000000000000000000900463ffffffff16426154fa565b905060003087604001518860a001518960c001516001612f48919061550d565b8a5180516020918201206101008d015160e08e0151604051612ffc98979695948c918c9132910173ffffffffffffffffffffffffffffffffffffffff9a8b168152988a1660208a015267ffffffffffffffff97881660408a0152959096166060880152608087019390935261ffff9190911660a086015263ffffffff90811660c08601526bffffffffffffffffffffffff9190911660e0850152919091166101008301529091166101208201526101400190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815282825280516020918201206101808401835280845230848301526bffffffffffffffffffffffff8716848401528a83015173ffffffffffffffffffffffffffffffffffffffff16606085015260a0808c015167ffffffffffffffff1660808087019190915260e0808e015163ffffffff90811693880193909352908d015168ffffffffffffffffff90811660c08801528b81169187019190915260085468010000000000000000810483166101008801526c0100000000000000000000000090048216610120870152908716610140860152881661016085015291519298509092506131159188910161552e565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152918152815160209283012060009384526007909252909120555092949350505050565b60006131976040518060a0016040528060608152602001606081526020016060815260200160608152602001606081525090565b6000808080806131a9888a018a615618565b84519499509297509095509350915060ff168015806131c9575084518114155b806131d5575083518114155b806131e1575082518114155b806131ed575081518114155b15613254576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f4669656c6473206d75737420626520657175616c206c656e67746800000000006044820152606401610a5c565b60005b818110156132ba5761329087828151811061327457613274614de0565b6020026020010151600090815260076020526040902054151590565b6132ba5761329f600183614db0565b81036132aa57600198505b6132b381614e0f565b9050613257565b50506040805160a0810182529586526020860194909452928401919091526060830152608082015290505b9250929050565b60006132f9826020615271565b613304856020615271565b613310886101446154fa565b61331a91906154fa565b61332491906154fa565b61332f9060006154fa565b905036811461339a576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f63616c6c64617461206c656e677468206d69736d6174636800000000000000006044820152606401610a5c565b50505050505050565b80515160ff1660005b8181101561065e576000613455846000015183815181106133cf576133cf614de0565b6020026020010151856020015184815181106133ed576133ed614de0565b60200260200101518660400151858151811061340b5761340b614de0565b60200260200101518760600151868151811061342957613429614de0565b60200260200101518860800151878151811061344757613447614de0565b6020026020010151886138c5565b9050600081600681111561346b5761346b61521e565b1480613488575060018160068111156134865761348661521e565b145b156134e15783518051839081106134a1576134a1614de0565b60209081029190910181015160405133815290917fc708e0440951fd63499c0f7a73819b469ee5dd3ecc356c0ab4eb7f18389009d9910160405180910390a25b506134eb81614e0f565b90506133ac565b600854600090700100000000000000000000000000000000900464ffffffffff1685101561353b57600854700100000000000000000000000000000000900464ffffffffff1694505b600854600090612710906135559063ffffffff1688615271565b61355f9190615499565b61356990876154fa565b60085490915060009088906135a29063ffffffff6c010000000000000000000000008204811691680100000000000000009004166152b7565b6135ac91906152b7565b63ffffffff16905060006135f66000368080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250613d9292505050565b90506000613617826136088587615271565b61361291906154fa565b613ed4565b905060008668ffffffffffffffffff168868ffffffffffffffffff168a68ffffffffffffffffff1661364991906154ad565b61365391906154ad565b905061365f81836154ad565b9b9a5050505050505050505050565b6000613678610e4f565b511115610dfb57610dfb612beb565b6000808a8a8a8a8a8a8a8a8a6040516020016136ab999897969594939291906156ea565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291905280516020909101207dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e01000000000000000000000000000000000000000000000000000000000000179150509998505050505050505050565b3373ffffffffffffffffffffffffffffffffffffffff8216036137b1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401610a5c565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b60006bffffffffffffffffffffffff821115612be7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203960448201527f36206269747300000000000000000000000000000000000000000000000000006064820152608401610a5c565b600080848060200190518101906138dc91906157b6565b905060003a8261012001518361010001516138f79190615890565b64ffffffffff166139089190615271565b905060008460ff166139506000368080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250613d9292505050565b61395a9190615499565b9050600061396b61361283856154fa565b905060006139783a613ed4565b90506000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663330605298e8e868b610160015168ffffffffffffffffff168c60e0015168ffffffffffffffffff168a6139e891906154ad565b6139f291906154ad565b336040518061016001604052808f6000015181526020018f6020015173ffffffffffffffffffffffffffffffffffffffff1681526020018f604001516bffffffffffffffffffffffff1681526020018f6060015173ffffffffffffffffffffffffffffffffffffffff1681526020018f6080015167ffffffffffffffff1681526020018f60a0015163ffffffff1681526020018f60c0015168ffffffffffffffffff1681526020018f60e0015168ffffffffffffffffff1681526020018f610100015164ffffffffff1681526020018f610120015164ffffffffff1681526020018f610140015163ffffffff168152506040518763ffffffff1660e01b8152600401613b03969594939291906158ae565b60408051808303816000875af1158015613b21573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613b45919061592a565b90925090506000826006811115613b5e57613b5e61521e565b1480613b7b57506001826006811115613b7957613b7961521e565b145b15613d815760008e815260076020526040812055613b9981856154ad565b336000908152600b602052604081208054909190613bc69084906bffffffffffffffffffffffff166154ad565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055508660e0015168ffffffffffffffffff16600c60008282829054906101000a90046bffffffffffffffffffffffff16613c2c91906154ad565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff16021790555086610160015168ffffffffffffffffff16600b6000613c77613ef3565b73ffffffffffffffffffffffffffffffffffffffff168152602081019190915260400160009081208054909190613cbd9084906bffffffffffffffffffffffff166154ad565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055508d7f08a4a0761e3c98d288cb4af9342660f49550d83139fb3b762b70d34bed6273688487848b60e001518c60c001518d6101600151604051613d78969594939291906bffffffffffffffffffffffff9687168152602081019590955292909416604084015268ffffffffffffffffff9081166060840152928316608083015290911660a082015260c00190565b60405180910390a25b509c9b505050505050505050505050565b600046613d9e81613f64565b15613e1a57606c73ffffffffffffffffffffffffffffffffffffffff1663c6f7de0e6040518163ffffffff1660e01b8152600401602060405180830381865afa158015613def573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613e13919061595d565b9392505050565b613e2381613f87565b15613ecb5773420000000000000000000000000000000000000f73ffffffffffffffffffffffffffffffffffffffff166349948e0e846040518060800160405280604881526020016159c360489139604051602001613e83929190615976565b6040516020818303038152906040526040518263ffffffff1660e01b8152600401613eae91906140df565b602060405180830381865afa158015613def573d6000803e3d6000fd5b50600092915050565b6000610730613ee1612904565b612b3584670de0b6b3a7640000615271565b60003073ffffffffffffffffffffffffffffffffffffffff16638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015613f40573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f491906159a5565b600061a4b1821480613f78575062066eed82145b8061073057505062066eee1490565b6000600a821480613f9957506101a482145b80613fa6575062aa37dc82145b80613fb2575061210582145b80613fbf575062014a3382145b8061073057505062014a341490565b604051806103e00160405280601f906020820280368337509192915050565b60008083601f840112613fff57600080fd5b50813567ffffffffffffffff81111561401757600080fd5b6020830191508360208285010111156132e557600080fd5b6000806020838503121561404257600080fd5b823567ffffffffffffffff81111561405957600080fd5b61406585828601613fed565b90969095509350505050565b60005b8381101561408c578181015183820152602001614074565b50506000910152565b600081518084526140ad816020860160208601614071565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000613e136020830184614095565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051610180810167ffffffffffffffff81118282101715614145576141456140f2565b60405290565b604051610160810167ffffffffffffffff81118282101715614145576141456140f2565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156141b6576141b66140f2565b604052919050565b600082601f8301126141cf57600080fd5b813567ffffffffffffffff8111156141e9576141e96140f2565b61421a60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8401160161416f565b81815284602083860101111561422f57600080fd5b816020850160208301376000918101602001919091529392505050565b60006020828403121561425e57600080fd5b813567ffffffffffffffff81111561427557600080fd5b612b44848285016141be565b73ffffffffffffffffffffffffffffffffffffffff81168114612a7957600080fd5b80356112dc81614281565b6bffffffffffffffffffffffff81168114612a7957600080fd5b80356112dc816142ae565b600080604083850312156142e657600080fd5b82356142f181614281565b91506020830135614301816142ae565b809150509250929050565b600081518084526020808501945080840160005b8381101561435257815173ffffffffffffffffffffffffffffffffffffffff1687529582019590820190600101614320565b509495945050505050565b602081526000613e13602083018461430c565b60006020828403121561438257600080fd5b5035919050565b60006020828403121561439b57600080fd5b813567ffffffffffffffff8111156143b257600080fd5b82016101608185031215613e1357600080fd5b8051825260208101516143f0602084018273ffffffffffffffffffffffffffffffffffffffff169052565b50604081015161441060408401826bffffffffffffffffffffffff169052565b506060810151614438606084018273ffffffffffffffffffffffffffffffffffffffff169052565b506080810151614454608084018267ffffffffffffffff169052565b5060a081015161446c60a084018263ffffffff169052565b5060c081015161448960c084018268ffffffffffffffffff169052565b5060e08101516144a660e084018268ffffffffffffffffff169052565b506101008181015164ffffffffff81168483015250506101208181015164ffffffffff81168483015250506101408181015163ffffffff8116848301525b50505050565b610160810161073082846143c5565b60008083601f84011261450b57600080fd5b50813567ffffffffffffffff81111561452357600080fd5b6020830191508360208260051b85010111156132e557600080fd5b60008060008060008060008060e0898b03121561455a57600080fd5b606089018a81111561456b57600080fd5b8998503567ffffffffffffffff8082111561458557600080fd5b6145918c838d01613fed565b909950975060808b01359150808211156145aa57600080fd5b6145b68c838d016144f9565b909750955060a08b01359150808211156145cf57600080fd5b506145dc8b828c016144f9565b999c989b50969995989497949560c00135949350505050565b63ffffffff81168114612a7957600080fd5b80356112dc816145f5565b64ffffffffff81168114612a7957600080fd5b80356112dc81614612565b803561ffff811681146112dc57600080fd5b67ffffffffffffffff81168114612a7957600080fd5b80356112dc81614642565b60ff81168114612a7957600080fd5b80356112dc81614663565b80357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff811681146112dc57600080fd5b600061018082840312156146bc57600080fd5b6146c4614121565b6146cd83614607565b81526146db60208401614607565b60208201526146ec60408401614607565b60408201526146fd60608401614607565b606082015261470e60808401614625565b608082015261471f60a08401614630565b60a082015261473060c08401614658565b60c082015261474160e08401614672565b60e082015261010061475481850161467d565b90820152610120614766848201614607565b90820152610140614778848201614630565b9082015261016061478a848201614630565b908201529392505050565b815163ffffffff168152610180810160208301516147bb602084018263ffffffff169052565b5060408301516147d3604084018263ffffffff169052565b5060608301516147eb606084018263ffffffff169052565b506080830151614804608084018264ffffffffff169052565b5060a083015161481a60a084018261ffff169052565b5060c083015161483660c084018267ffffffffffffffff169052565b5060e083015161484b60e084018260ff169052565b50610100838101517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16908301526101208084015163ffffffff16908301526101408084015161ffff908116918401919091526101608085015191821681850152905b505092915050565b6000806000806000608086880312156148ca57600080fd5b85356148d581614642565b9450602086013567ffffffffffffffff8111156148f157600080fd5b6148fd88828901613fed565b9095509350506040860135614911816145f5565b949793965091946060013592915050565b600067ffffffffffffffff82111561493c5761493c6140f2565b5060051b60200190565b600082601f83011261495757600080fd5b8135602061496c61496783614922565b61416f565b82815260059290921b8401810191818101908684111561498b57600080fd5b8286015b848110156149af5780356149a281614281565b835291830191830161498f565b509695505050505050565b60008060008060008060c087890312156149d357600080fd5b863567ffffffffffffffff808211156149eb57600080fd5b6149f78a838b01614946565b97506020890135915080821115614a0d57600080fd5b614a198a838b01614946565b9650614a2760408a01614672565b95506060890135915080821115614a3d57600080fd5b614a498a838b016141be565b9450614a5760808a01614658565b935060a0890135915080821115614a6d57600080fd5b50614a7a89828a016141be565b9150509295509295509295565b600060208284031215614a9957600080fd5b8135613e1381614281565b600181811c90821680614ab857607f821691505b602082108103612a42577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b601f82111561065e57600081815260208120601f850160051c81016020861015614b185750805b601f850160051c820191505b818110156108e757828155600101614b24565b67ffffffffffffffff831115614b4f57614b4f6140f2565b614b6383614b5d8354614aa4565b83614af1565b6000601f841160018114614bb55760008515614b7f5750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b178355614c4b565b6000838152602090207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0861690835b82811015614c045786850135825560209485019460019092019101614be4565b5086821015614c3f577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b68ffffffffffffffffff81168114612a7957600080fd5b80516112dc81614c52565b600060208284031215614c8657600080fd5b8151613e1381614c52565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006bffffffffffffffffffffffff80841680614d0e57614d0e614c91565b92169190910492915050565b6bffffffffffffffffffffffff828116828216039080821115614d3f57614d3f614cc0565b5092915050565b805169ffffffffffffffffffff811681146112dc57600080fd5b600080600080600060a08688031215614d7857600080fd5b614d8186614d46565b9450602086015193506040860151925060608601519150614da460808701614d46565b90509295509295909350565b8181038181111561073057610730614cc0565b600060208284031215614dd557600080fd5b8151613e1381614663565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203614e4057614e40614cc0565b5060010190565b80356112dc81614c52565b60006101608236031215614e6557600080fd5b614e6d61414b565b823567ffffffffffffffff811115614e8457600080fd5b614e90368286016141be565b82525060208301356020820152614ea9604084016142a3565b6040820152614eba606084016142c8565b6060820152614ecb60808401614e47565b6080820152614edc60a08401614658565b60a0820152614eed60c08401614658565b60c0820152614efe60e08401614607565b60e0820152610100614f11818501614630565b90820152610120614f23848201614658565b90820152610140614f358482016142a3565b9082015292915050565b600060208284031215614f5157600080fd5b8135613e1381614642565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112614f9157600080fd5b83018035915067ffffffffffffffff821115614fac57600080fd5b6020019150368190038213156132e557600080fd5b600060208284031215614fd357600080fd5b613e1382614630565b600060208284031215614fee57600080fd5b8135613e13816145f5565b805182526020810151615024602084018273ffffffffffffffffffffffffffffffffffffffff169052565b50604081015161504460408401826bffffffffffffffffffffffff169052565b50606081015161506c606084018273ffffffffffffffffffffffffffffffffffffffff169052565b506080810151615088608084018267ffffffffffffffff169052565b5060a08101516150a060a084018263ffffffff169052565b5060c08101516150bd60c084018268ffffffffffffffffff169052565b5060e08101516150da60e084018268ffffffffffffffffff169052565b506101008181015164ffffffffff9081169184019190915261012080830151909116908301526101408082015163ffffffff16908301526101608082015168ffffffffffffffffff8116828501526144e4565b73ffffffffffffffffffffffffffffffffffffffff8a8116825267ffffffffffffffff8a166020830152881660408201526102606060820181905281018690526000610280878982850137600083890182015261ffff8716608084015260a0830186905263ffffffff851660c0840152601f88017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01683010190506151d560e0830184614ff9565b9a9950505050505050505050565b60ff818116838216019081111561073057610730614cc0565b600060ff83168061520f5761520f614c91565b8060ff84160491505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b8183823760009101908152919050565b828152606082602083013760800192915050565b808202811582820484141761073057610730614cc0565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b63ffffffff818116838216019080821115614d3f57614d3f614cc0565b600061012063ffffffff808d1684528b6020850152808b166040850152508060608401526153048184018a61430c565b90508281036080840152615318818961430c565b905060ff871660a084015282810360c08401526153358187614095565b905067ffffffffffffffff851660e084015282810361010084015261535a8185614095565b9c9b505050505050505050505050565b600181815b808511156153c357817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048211156153a9576153a9614cc0565b808516156153b657918102915b93841c939080029061536f565b509250929050565b6000826153da57506001610730565b816153e757506000610730565b81600181146153fd576002811461540757615423565b6001915050610730565b60ff84111561541857615418614cc0565b50506001821b610730565b5060208310610133831016604e8410600b8410161715615446575081810a610730565b615450838361536a565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0482111561548257615482614cc0565b029392505050565b6000613e1360ff8416836153cb565b6000826154a8576154a8614c91565b500490565b6bffffffffffffffffffffffff818116838216019080821115614d3f57614d3f614cc0565b6bffffffffffffffffffffffff8181168382160280821691908281146148aa576148aa614cc0565b8082018082111561073057610730614cc0565b67ffffffffffffffff818116838216019080821115614d3f57614d3f614cc0565b61018081016107308284614ff9565b600082601f83011261554e57600080fd5b8135602061555e61496783614922565b82815260059290921b8401810191818101908684111561557d57600080fd5b8286015b848110156149af5780358352918301918301615581565b600082601f8301126155a957600080fd5b813560206155b961496783614922565b82815260059290921b840181019181810190868411156155d857600080fd5b8286015b848110156149af57803567ffffffffffffffff8111156155fc5760008081fd5b61560a8986838b01016141be565b8452509183019183016155dc565b600080600080600060a0868803121561563057600080fd5b853567ffffffffffffffff8082111561564857600080fd5b61565489838a0161553d565b9650602088013591508082111561566a57600080fd5b61567689838a01615598565b9550604088013591508082111561568c57600080fd5b61569889838a01615598565b945060608801359150808211156156ae57600080fd5b6156ba89838a01615598565b935060808801359150808211156156d057600080fd5b506156dd88828901615598565b9150509295509295909350565b60006101208b835273ffffffffffffffffffffffffffffffffffffffff8b16602084015267ffffffffffffffff808b1660408501528160608501526157318285018b61430c565b91508382036080850152615745828a61430c565b915060ff881660a085015283820360c08501526157628288614095565b90861660e0850152838103610100850152905061535a8185614095565b80516112dc81614281565b80516112dc816142ae565b80516112dc81614642565b80516112dc816145f5565b80516112dc81614612565b600061018082840312156157c957600080fd5b6157d1614121565b825181526157e16020840161577f565b60208201526157f26040840161578a565b60408201526158036060840161577f565b606082015261581460808401615795565b608082015261582560a084016157a0565b60a082015261583660c08401614c69565b60c082015261584760e08401614c69565b60e082015261010061585a8185016157ab565b9082015261012061586c8482016157ab565b9082015261014061587e8482016157a0565b9082015261016061478a848201614c69565b64ffffffffff818116838216019080821115614d3f57614d3f614cc0565b60006102008083526158c28184018a614095565b905082810360208401526158d68189614095565b6bffffffffffffffffffffffff88811660408601528716606085015273ffffffffffffffffffffffffffffffffffffffff86166080850152915061591f905060a08301846143c5565b979650505050505050565b6000806040838503121561593d57600080fd5b82516007811061594c57600080fd5b6020840151909250614301816142ae565b60006020828403121561596f57600080fd5b5051919050565b60008351615988818460208801614071565b83519083019061599c818360208801614071565b01949350505050565b6000602082840312156159b757600080fd5b8151613e138161428156fe307866666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666a164736f6c6343000813000a", } var FunctionsCoordinatorABI = FunctionsCoordinatorMetaData.ABI @@ -1656,9 +1656,9 @@ type FunctionsCoordinatorRequestBilled struct { JuelsPerGas *big.Int L1FeeShareWei *big.Int CallbackCostJuels *big.Int - DonFee *big.Int - AdminFee *big.Int - OperationFee *big.Int + DonFeeJuels *big.Int + AdminFeeJuels *big.Int + OperationFeeJuels *big.Int Raw types.Log } @@ -1888,7 +1888,7 @@ func (FunctionsCoordinatorConfigSet) Topic() common.Hash { } func (FunctionsCoordinatorConfigUpdated) Topic() common.Hash { - return common.HexToHash("0x165999a4d7499227f20106b83c79a73315af2ecd639138d441db651c5f635e86") + return common.HexToHash("0x2e2c8535dcc25459d519f2300c114d2d2128bf6399722d04eca078461a3bf33a") } func (FunctionsCoordinatorOracleRequest) Topic() common.Hash { diff --git a/core/gethwrappers/functions/generation/generated-wrapper-dependency-versions-do-not-edit.txt b/core/gethwrappers/functions/generation/generated-wrapper-dependency-versions-do-not-edit.txt index 3b8a032824a..da566182e50 100644 --- a/core/gethwrappers/functions/generation/generated-wrapper-dependency-versions-do-not-edit.txt +++ b/core/gethwrappers/functions/generation/generated-wrapper-dependency-versions-do-not-edit.txt @@ -4,7 +4,7 @@ functions_allow_list: ../../../contracts/solc/v0.8.19/functions/v1_X/TermsOfServ functions_billing_registry_events_mock: ../../../contracts/solc/v0.8.6/functions/v0_0_0/FunctionsBillingRegistryEventsMock.abi ../../../contracts/solc/v0.8.6/functions/v0_0_0/FunctionsBillingRegistryEventsMock.bin 50deeb883bd9c3729702be335c0388f9d8553bab4be5e26ecacac496a89e2b77 functions_client: ../../../contracts/solc/v0.8.19/functions/v1_X/FunctionsClient.abi ../../../contracts/solc/v0.8.19/functions/v1_X/FunctionsClient.bin 2368f537a04489c720a46733f8596c4fc88a31062ecfa966d05f25dd98608aca functions_client_example: ../../../contracts/solc/v0.8.19/functions/v1_X/FunctionsClientExample.abi ../../../contracts/solc/v0.8.19/functions/v1_X/FunctionsClientExample.bin abf32e69f268f40e8530eb8d8e96bf310b798a4c0049a58022d9d2fb527b601b -functions_coordinator: ../../../contracts/solc/v0.8.19/functions/v1_X/FunctionsCoordinator.abi ../../../contracts/solc/v0.8.19/functions/v1_X/FunctionsCoordinator.bin 87c95b1fd19ea664fbfae422a402b700c8da94eb47b06e676a25d1b159bfda63 +functions_coordinator: ../../../contracts/solc/v0.8.19/functions/v1_X/FunctionsCoordinator.abi ../../../contracts/solc/v0.8.19/functions/v1_X/FunctionsCoordinator.bin 8c47e8239e1c8d000c832bba7d0148df104002f70366b4d8238f272d43c15edc functions_coordinator_1_1_0: ../../../contracts/solc/v0.8.19/functions/v1_1_0/FunctionsCoordinator.abi ../../../contracts/solc/v0.8.19/functions/v1_1_0/FunctionsCoordinator.bin 88c2f899cfcb7b21530741b5446f3a32c92d8b457bfdd2a0160f51364b8d5d1a functions_load_test_client: ../../../contracts/solc/v0.8.19/functions/v1_X/FunctionsLoadTestClient.abi ../../../contracts/solc/v0.8.19/functions/v1_X/FunctionsLoadTestClient.bin c8dbbd5ebb34435800d6674700068837c3a252db60046a14b0e61e829db517de functions_oracle_events_mock: ../../../contracts/solc/v0.8.6/functions/v0_0_0/FunctionsOracleEventsMock.abi ../../../contracts/solc/v0.8.6/functions/v0_0_0/FunctionsOracleEventsMock.bin 3ca70f966f8fe751987f0ccb50bebb6aa5be77e4a9f835d1ae99e0e9bfb7d52c diff --git a/core/services/ocr2/plugins/functions/integration_tests/v1/internal/testutils.go b/core/services/ocr2/plugins/functions/integration_tests/v1/internal/testutils.go index 9408a4a84f4..9a4f2a72995 100644 --- a/core/services/ocr2/plugins/functions/integration_tests/v1/internal/testutils.go +++ b/core/services/ocr2/plugins/functions/integration_tests/v1/internal/testutils.go @@ -226,12 +226,12 @@ func StartNewChainWithContracts(t *testing.T, nClients int) (*bind.TransactOpts, GasOverheadBeforeCallback: uint32(325_000), GasOverheadAfterCallback: uint32(50_000), RequestTimeoutSeconds: uint32(300), - DonFee: big.NewInt(0), + DonFee: uint16(0), MaxSupportedRequestDataVersion: uint16(1), FulfillmentGasPriceOverEstimationBP: uint32(1_000), FallbackNativePerUnitLink: big.NewInt(5_000_000_000_000_000), MinimumEstimateGasPriceWei: big.NewInt(1_000_000_000), - OperationFee: big.NewInt(0), + OperationFee: uint16(0), FallbackUsdPerUnitLink: uint64(1_400_000_000), FallbackUsdPerUnitLinkDecimals: uint8(8), } From e26672dbf45db36e040eded0f0102bf6166a050f Mon Sep 17 00:00:00 2001 From: Justin Kaseman Date: Fri, 16 Feb 2024 17:42:53 -0800 Subject: [PATCH 07/19] (test): Update LogPollerWrapper tests with Coordinator V1 vs V2 --- .../evm/functions/logpoller_wrapper_test.go | 172 +++++++++++++++++- 1 file changed, 162 insertions(+), 10 deletions(-) diff --git a/core/services/relay/evm/functions/logpoller_wrapper_test.go b/core/services/relay/evm/functions/logpoller_wrapper_test.go index 9df285b4c25..76b0db8a5e3 100644 --- a/core/services/relay/evm/functions/logpoller_wrapper_test.go +++ b/core/services/relay/evm/functions/logpoller_wrapper_test.go @@ -7,7 +7,10 @@ import ( "testing" "time" + "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/common/hexutil" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" @@ -17,6 +20,7 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/chains/evm/logpoller" lpmocks "github.com/smartcontractkit/chainlink/v2/core/chains/evm/logpoller/mocks" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/functions/generated/functions_coordinator" + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/functions/generated/functions_coordinator_1_1_0" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/functions/config" "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/types" @@ -27,6 +31,17 @@ type subscriber struct { expectedCalls int } +const ( + CoordinatorContractV100 = "Functions Coordinator v1.0.0" + CoordinatorContractV200 = "Functions Coordinator v2.0.0" + OracleRequestV200 = `[{"constant":true,"inputs":[{"indexed":true,"internalType":"bytes32","name":"requestId","type":"bytes32"},{"indexed":true,"internalType":"address","name":"requestingContract","type":"address"},{"indexed":false,"internalType":"address","name":"requestInitiator","type":"address"},{"indexed":false,"internalType":"uint64","name":"subscriptionId","type":"uint64"},{"indexed":false,"internalType":"address","name":"subscriptionOwner","type":"address"},{"indexed":false,"internalType":"bytes","name":"data","type":"bytes"},{"indexed":false,"internalType":"uint16","name":"dataVersion","type":"uint16"},{"indexed":false,"internalType":"bytes32","name":"flags","type":"bytes32"},{"indexed":false,"internalType":"uint64","name":"callbackGasLimit","type":"uint64"},{"components":[{"internalType":"bytes32","name":"requestId","type":"bytes32"},{"internalType":"address","name":"coordinator","type":"address"},{"internalType":"uint96","name":"estimatedTotalCostJuels","type":"uint96"},{"internalType":"address","name":"client","type":"address"},{"internalType":"uint64","name":"subscriptionId","type":"uint64"},{"internalType":"uint32","name":"callbackGasLimit","type":"uint32"},{"internalType":"uint72","name":"adminFee","type":"uint72"},{"internalType":"uint72","name":"donFee","type":"uint72"},{"internalType":"uint40","name":"gasOverheadBeforeCallback","type":"uint40"},{"internalType":"uint40","name":"gasOverheadAfterCallback","type":"uint40"},{"internalType":"uint32","name":"timeoutTimestamp","type":"uint32"},{"internalType":"uint72","name":"operationFee","type":"uint72"}],"indexed":false,"internalType":"structFunctionsResponse.Commitment","name":"commitment","type":"tuple"}],"name":"OracleRequest","type":"function"}]` +) + +var routerAddressBytes []byte +var routerAddressHex common.Address +var coordinatorAddressBytes []byte +var coordinatorAddressHex common.Address + func (s *subscriber) UpdateRoutes(activeCoordinator common.Address, proposedCoordinator common.Address) error { if s.expectedCalls == 0 { panic("unexpected call to UpdateRoutes") @@ -59,13 +74,17 @@ func setUp(t *testing.T, updateFrequencySec uint32) (*lpmocks.LogPoller, types.L ContractUpdateCheckFrequencySec: updateFrequencySec, ContractVersion: 1, } - lpWrapper, err := NewLogPollerWrapper(common.Address{}, config, client, lp, lggr) + routerAddressBytes = addr(t, "01") + routerAddressHex = common.BytesToAddress(routerAddressBytes) + coordinatorAddressBytes = addr(t, "02") + coordinatorAddressHex = common.BytesToAddress(coordinatorAddressBytes) + lpWrapper, err := NewLogPollerWrapper(routerAddressHex, config, client, lp, lggr) require.NoError(t, err) return lp, lpWrapper, client } -func getMockedRequestLog(t *testing.T) logpoller.Log { +func getMockedRequestLogV1(t *testing.T) logpoller.Log { // NOTE: Change this to be a more readable log generation data, err := hex.DecodeString("000000000000000000000000c113ba31b0080f940ca5812bbccc1e038ea9efb40000000000000000000000000000000000000000000000000000000000000001000000000000000000000000c113ba31b0080f940ca5812bbccc1e038ea9efb4000000000000000000000000000000000000000000000000000000000000024000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001117082cd81744eb9504dc37f53a86db7e3fb24929b8e7507b097d501ab5b315fb20e0000000000000000000000001b4f2b0e6363097f413c249910d5bc632993ed08000000000000000000000000000000000000000000000000015bcf880382c000000000000000000000000000665785a800593e8fa915208c1ce62f6e57fd75ba0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000001117000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004f588000000000000000000000000000000000000000000000000000000000000c350000000000000000000000000000000000000000000000000000000000000021c00000000000000000000000000000000000000000000000000000000000008866c636f64654c6f636174696f6ec258200000000000000000000000000000000000000000000000000000000000000000686c616e6775616765c25820000000000000000000000000000000000000000000000000000000000000000066736f757263657907d0633836366665643238326533313137636466303836633934396662613133643834666331376131656335353934656361643034353133646632326137623538356333363763633132326236373138306334383737303435616235383033373463353066313862346564386132346131323437383532363731623030633035663237373163663036363632333663333236393939323139363866323833346438626462616266306661643165313237613837643237363936323831643965656539326134646263316337356137316136656333613135356438633230616661643064623432383362613433353736303734653035633433633561653061656466643332323838346536613231386466323430323630316436356437316131303061633065376563643037663565646364633535643562373932646130626632353665623038363139336463376431333965613764373965653531653831356465333834386565643363366330353837393265366461333434363738626436373239346636643639656564356132663836323835343965616530323235323835346232666361333635646265623032383433386537326234383465383864316136646563373933633739656265353834666465363465663831383363313365386231623735663037636532303963393138633532643637613735343862653236366433663964316439656132613162303166633838376231316162383739663164333861373833303563373031316533643938346130393863663634383931316536653065383038396365306130363230393136663134323935343036336630376239343931326435666331393366303138633764616135363136323562313966376463323036663930353365623234643036323234616164326338623430646162663631656166666635326234653831373239353837333830313561643730663739316663643864333739343035353737393563383937363164636665333639373938373437353439633234643530646464303563623337613465613863353162306530313032363738643433653766306563353039653434633564343764353335626261363831303936383264643864653439326532363633646336653133653532383539663664336565306533633430336236366362653338643236366137356163373639363863613465653331396166363965373431333137393162653630376537353832373430366164653038306335623239653665343262386563386137373761663865383166336234616337626263666531643066616633393338613664353061316561633835643933643234343066313863333037356237306433626134663930323836396439383937663266636562626262366263646439333436633336633663643838626434336265306562333134323562343665613765386338336638386230363933343836383666366134313839623535666132666431396634326264333730313634616339356530303635656461663130373761633131366632393930303833616631333839636661666336613433323439376531363437393762633738616633366335613435366136646661326636626430626639326136613930366130653930313130626266323265613066333163663364353132663466303331653236343330633831663935656431323362323938356266623830623161396432646337306232356264613961386261303839323833666166663634383661316231646235613938353564346237363966623835663531353063393935306462303964373536326537353133633234653531636163366634366634633231636234373561613937363166666466626434656138613531626465613432383037313466363538393630656336643139656539373237626339316635313665346466306665346264613762623035343161393462326334396636323938616132396337656130646662653635346632306437663164323239633066303262356535326137363031376237306439383232643533383166623966613166393361353861376338383632326631326462643363623937323363626132313639633337643538303939336333663666393065323039336331336130363132323334303064393731363031656262313631343332613966666333373033396562663537326364326566666635636562323539346236346462336261616431633734663532653938343938353964383363313238353465376263393764363432363464653931343735386333386438383739343132333937653263643534653431366234373962363331623830626633306266653062366239353564393066356362303435346361373531303963393938366330636536316165356566376534653433353036313432633633646235363862383634353139623463306636366137633161376661336538666431323231376666336665383164663830643138386232646334343833356132663332323733666133353139633531343764643233353763326161346336326461386238353232306535386130333565373662633133316634623734376632663731643263663933376431303832356138316533623963323136663962316134646431663239383463656635656363656265353530363662363061373263363063323864303336653766386635323131343735386638326366323330646636363930636364617267739f64617267316461726732ff6f736563726574734c6f636174696f6ec2582000000000000000000000000000000000000000000000000000000000000000016773656372657473430102030000000000000000000000000000000000000000000000000000") require.NoError(t, err) @@ -83,15 +102,77 @@ func getMockedRequestLog(t *testing.T) logpoller.Log { } } -func TestLogPollerWrapper_SingleSubscriberEmptyEvents(t *testing.T) { +func getMockedRequestLogV2(t *testing.T) logpoller.Log { + // NOTE: Change this to be a more readable log generation + data, err := hex.DecodeString("0000000000000000000000007e5f4552091a69125d5dfcb7b8c2659029395bdf00000000000000000000000000000000000000000000000000000000000000010000000000000000000000007e5f4552091a69125d5dfcb7b8c2659029395bdf000000000000000000000000000000000000000000000000000000000000026000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000157c0e93aa2d812e96736b4fa41a2e4688e841879a42eead6f06eef541bea9ea289b000000000000000000000000b9816fc57977d5a786e654c7cf76767be63b966e00000000000000000000000000000000000000000000000003fa7025a86e0db80000000000000000000000005cf7f96627f3c9903763d128a1cc5d97556a6b990000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000157c000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000ecd8fae906aaaa0000000000000000000000000000000000000000000000000000000000019a280000000000000000000000000000000000000000000000000000000000016ef6000000000000000000000000000000000000000000000000000000004996041c00000000000000000000000000000000000000000000000000ecd8fae906aaaa00000000000000000000000000000000000000000000000000000000000000796c636f64654c6f636174696f6ec258200000000000000000000000000000000000000000000000000000000000000000686c616e6775616765c25820000000000000000000000000000000000000000000000000000000000000000066736f757263657572657475726e202768656c6c6f20776f726c64273b00000000000000") + require.NoError(t, err) + topic0, err := hex.DecodeString("718684b6c135c1277575a7b5c7365bc9587d5ebfd899230d5fa11360f6143bfb") + require.NoError(t, err) + // Create a random requestID + topic1 := make([]byte, 32) + _, err = rand.Read(topic1) + require.NoError(t, err) + topic2, err := hex.DecodeString("000000000000000000000000665785a800593e8fa915208c1ce62f6e57fd75ba") + require.NoError(t, err) + return logpoller.Log{ + Topics: [][]byte{topic0, topic1, topic2}, + Data: data, + } +} + +func TestLogPollerWrapper_SingleSubscriberEmptyEvents_CoordinatorV1(t *testing.T) { t.Parallel() lp, lpWrapper, client := setUp(t, 100_000) // check only once lp.On("LatestBlock").Return(logpoller.LogPollerBlock{BlockNumber: int64(100)}, nil) lp.On("Logs", mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return([]logpoller.Log{}, nil) - client.On("CallContract", mock.Anything, mock.Anything, mock.Anything).Return(addr(t, "01"), nil) + client.On("CallContract", mock.Anything, ethereum.CallMsg{ // getContractById + To: &routerAddressHex, + Data: []uint8{0xa9, 0xc9, 0xa9, 0x18, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, + }, mock.Anything).Return(coordinatorAddressBytes, nil) + client.On("CallContract", mock.Anything, ethereum.CallMsg{ // getProposedContractById + To: &routerAddressHex, + Data: []uint8{0x6a, 0x22, 0x15, 0xde, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, + }, mock.Anything).Return(addr(t, "00"), nil) lp.On("RegisterFilter", mock.Anything).Return(nil) + typeAndVersionResponse, err := encodeTypeAndVersion(CoordinatorContractV100) + require.NoError(t, err) + client.On("CallContract", mock.Anything, ethereum.CallMsg{ // typeAndVersion + To: &coordinatorAddressHex, + Data: hexutil.MustDecode("0x181f5a77"), + }, mock.Anything).Return(typeAndVersionResponse, nil) + subscriber := newSubscriber(1) + lpWrapper.SubscribeToUpdates("mock_subscriber", subscriber) + servicetest.Run(t, lpWrapper) + subscriber.updates.Wait() + reqs, resps, err := lpWrapper.LatestEvents() + require.NoError(t, err) + require.Equal(t, 0, len(reqs)) + require.Equal(t, 0, len(resps)) +} + +func TestLogPollerWrapper_SingleSubscriberEmptyEvents_CoordinatorV2(t *testing.T) { + t.Parallel() + lp, lpWrapper, client := setUp(t, 100_000) // check only once + lp.On("LatestBlock").Return(logpoller.LogPollerBlock{BlockNumber: int64(100)}, nil) + + lp.On("Logs", mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return([]logpoller.Log{}, nil) + client.On("CallContract", mock.Anything, ethereum.CallMsg{ // getContractById + To: &routerAddressHex, + Data: []uint8{0xa9, 0xc9, 0xa9, 0x18, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, + }, mock.Anything).Return(coordinatorAddressBytes, nil) + client.On("CallContract", mock.Anything, ethereum.CallMsg{ // getProposedContractById + To: &routerAddressHex, + Data: []uint8{0x6a, 0x22, 0x15, 0xde, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, + }, mock.Anything).Return(addr(t, "00"), nil) + lp.On("RegisterFilter", mock.Anything).Return(nil) + typeAndVersionResponse, err := encodeTypeAndVersion(CoordinatorContractV200) + require.NoError(t, err) + client.On("CallContract", mock.Anything, ethereum.CallMsg{ // typeAndVersion + To: &coordinatorAddressHex, + Data: hexutil.MustDecode("0x181f5a77"), + }, mock.Anything).Return(typeAndVersionResponse, nil) subscriber := newSubscriber(1) lpWrapper.SubscribeToUpdates("mock_subscriber", subscriber) @@ -115,15 +196,74 @@ func TestLogPollerWrapper_ErrorOnZeroAddresses(t *testing.T) { require.Error(t, err) } -func TestLogPollerWrapper_LatestEvents_ReorgHandling(t *testing.T) { +func TestLogPollerWrapper_LatestEvents_ReorgHandlingV1(t *testing.T) { t.Parallel() lp, lpWrapper, client := setUp(t, 100_000) lp.On("LatestBlock").Return(logpoller.LogPollerBlock{BlockNumber: int64(100)}, nil) - client.On("CallContract", mock.Anything, mock.Anything, mock.Anything).Return(addr(t, "01"), nil) + client.On("CallContract", mock.Anything, ethereum.CallMsg{ // getContractById + To: &routerAddressHex, + Data: []uint8{0xa9, 0xc9, 0xa9, 0x18, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, + }, mock.Anything).Return(coordinatorAddressBytes, nil) + client.On("CallContract", mock.Anything, ethereum.CallMsg{ // getProposedContractById + To: &routerAddressHex, + Data: []uint8{0x6a, 0x22, 0x15, 0xde, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, + }, mock.Anything).Return(addr(t, "00"), nil) + typeAndVersionResponse, err := encodeTypeAndVersion(CoordinatorContractV100) + require.NoError(t, err) + client.On("CallContract", mock.Anything, ethereum.CallMsg{ // typeAndVersion + To: &coordinatorAddressHex, + Data: hexutil.MustDecode("0x181f5a77"), + }, mock.Anything).Return(typeAndVersionResponse, nil) lp.On("RegisterFilter", mock.Anything).Return(nil) subscriber := newSubscriber(1) lpWrapper.SubscribeToUpdates("mock_subscriber", subscriber) - mockedLog := getMockedRequestLog(t) + mockedLog := getMockedRequestLogV1(t) + // All logPoller queries for responses return none + lp.On("Logs", mock.Anything, mock.Anything, functions_coordinator_1_1_0.FunctionsCoordinator110OracleResponse{}.Topic(), mock.Anything).Return([]logpoller.Log{}, nil) + // On the first logPoller query for requests, the request log appears + lp.On("Logs", mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return([]logpoller.Log{mockedLog}, nil).Once() + // On the 2nd query, the request log disappears + lp.On("Logs", mock.Anything, mock.Anything, functions_coordinator_1_1_0.FunctionsCoordinator110OracleRequest{}.Topic(), mock.Anything).Return([]logpoller.Log{}, nil).Once() + // On the 3rd query, the original request log appears again + lp.On("Logs", mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return([]logpoller.Log{mockedLog}, nil).Once() + + servicetest.Run(t, lpWrapper) + subscriber.updates.Wait() + + oracleRequests, _, err := lpWrapper.LatestEvents() + require.NoError(t, err) + assert.Equal(t, 1, len(oracleRequests)) + oracleRequests, _, err = lpWrapper.LatestEvents() + require.NoError(t, err) + assert.Equal(t, 0, len(oracleRequests)) + require.NoError(t, err) + oracleRequests, _, err = lpWrapper.LatestEvents() + require.NoError(t, err) + assert.Equal(t, 0, len(oracleRequests)) +} + +func TestLogPollerWrapper_LatestEvents_ReorgHandlingV2(t *testing.T) { + t.Parallel() + lp, lpWrapper, client := setUp(t, 100_000) + lp.On("LatestBlock").Return(logpoller.LogPollerBlock{BlockNumber: int64(100)}, nil) + client.On("CallContract", mock.Anything, ethereum.CallMsg{ // getContractById + To: &routerAddressHex, + Data: []uint8{0xa9, 0xc9, 0xa9, 0x18, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, + }, mock.Anything).Return(coordinatorAddressBytes, nil) + client.On("CallContract", mock.Anything, ethereum.CallMsg{ // getProposedContractById + To: &routerAddressHex, + Data: []uint8{0x6a, 0x22, 0x15, 0xde, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, + }, mock.Anything).Return(addr(t, "00"), nil) + typeAndVersionResponse, err := encodeTypeAndVersion(CoordinatorContractV200) + require.NoError(t, err) + client.On("CallContract", mock.Anything, ethereum.CallMsg{ // typeAndVersion + To: &coordinatorAddressHex, + Data: hexutil.MustDecode("0x181f5a77"), + }, mock.Anything).Return(typeAndVersionResponse, nil) + lp.On("RegisterFilter", mock.Anything).Return(nil) + subscriber := newSubscriber(1) + lpWrapper.SubscribeToUpdates("mock_subscriber", subscriber) + mockedLog := getMockedRequestLogV2(t) // All logPoller queries for responses return none lp.On("Logs", mock.Anything, mock.Anything, functions_coordinator.FunctionsCoordinatorOracleResponse{}.Topic(), mock.Anything).Return([]logpoller.Log{}, nil) // On the first logPoller query for requests, the request log appears @@ -154,7 +294,7 @@ func TestLogPollerWrapper_FilterPreviouslyDetectedEvents_TruncatesLogs(t *testin inputLogs := make([]logpoller.Log, maxLogsToProcess+100) for i := 0; i < 1100; i++ { - inputLogs[i] = getMockedRequestLog(t) + inputLogs[i] = getMockedRequestLogV1(t) } functionsLpWrapper := lpWrapper.(*logPollerWrapper) @@ -169,7 +309,7 @@ func TestLogPollerWrapper_FilterPreviouslyDetectedEvents_TruncatesLogs(t *testin func TestLogPollerWrapper_FilterPreviouslyDetectedEvents_SkipsInvalidLog(t *testing.T) { t.Parallel() _, lpWrapper, _ := setUp(t, 100_000) - inputLogs := []logpoller.Log{getMockedRequestLog(t)} + inputLogs := []logpoller.Log{getMockedRequestLogV1(t)} inputLogs[0].Topics = [][]byte{[]byte("invalid topic")} mockedDetectedEvents := detectedEvents{isPreviouslyDetected: make(map[[32]byte]struct{})} @@ -184,7 +324,7 @@ func TestLogPollerWrapper_FilterPreviouslyDetectedEvents_SkipsInvalidLog(t *test func TestLogPollerWrapper_FilterPreviouslyDetectedEvents_FiltersPreviouslyDetectedEvent(t *testing.T) { t.Parallel() _, lpWrapper, _ := setUp(t, 100_000) - mockedRequestLog := getMockedRequestLog(t) + mockedRequestLog := getMockedRequestLogV1(t) inputLogs := []logpoller.Log{mockedRequestLog} var mockedRequestId [32]byte copy(mockedRequestId[:], mockedRequestLog.Topics[1]) @@ -207,3 +347,15 @@ func TestLogPollerWrapper_FilterPreviouslyDetectedEvents_FiltersPreviouslyDetect assert.Equal(t, 0, len(mockedDetectedEvents.detectedEventsOrdered)) assert.Equal(t, 0, len(mockedDetectedEvents.isPreviouslyDetected)) } + +func encodeTypeAndVersion(typeAndVersion string) ([]byte, error) { + stringAbiType, _ := abi.NewType("string", "string", nil) + abiDec := abi.Arguments{ + {Type: stringAbiType}, + } + nameEncoded, err := abiDec.Pack(typeAndVersion) + if err != nil { + return nil, err + } + return nameEncoded, nil +} From 09df3928fdfbca44d3b8e4220a0a3c47c290e9a4 Mon Sep 17 00:00:00 2001 From: Justin Kaseman Date: Mon, 19 Feb 2024 11:13:10 -0800 Subject: [PATCH 08/19] Changes from review --- .../gas-snapshots/functions.gas-snapshot | 138 +++++++++--------- .../scripts/native_solc_compile_all_functions | 3 +- .../functions/dev/v1_X/FunctionsBilling.sol | 50 +++---- .../dev/v1_X/FunctionsCoordinator.sol | 4 +- .../dev/v1_X/interfaces/IFunctionsBilling.sol | 10 +- .../dev/v1_X/libraries/FunctionsResponse.sol | 6 +- .../tests/v1_X/FunctionsBilling.t.sol | 49 ++++--- .../tests/v1_X/FunctionsCoordinator.t.sol | 6 +- .../tests/v1_X/FunctionsRouter.t.sol | 4 +- .../src/v0.8/functions/tests/v1_X/Setup.t.sol | 16 +- .../functions/v1_1_0/FunctionsBilling.sol | 2 +- contracts/test/v0.8/functions/v1/utils.ts | 8 +- .../functions_coordinator.go | 56 +++---- .../functions_coordinator_1_1_0.go | 2 +- ...rapper-dependency-versions-do-not-edit.txt | 3 +- core/gethwrappers/functions/go_generate.go | 1 - .../v1/internal/testutils.go | 4 +- .../relay/evm/functions/logpoller_wrapper.go | 6 +- 18 files changed, 184 insertions(+), 184 deletions(-) diff --git a/contracts/gas-snapshots/functions.gas-snapshot b/contracts/gas-snapshots/functions.gas-snapshot index 123a4b59688..a3b76d42af5 100644 --- a/contracts/gas-snapshots/functions.gas-snapshot +++ b/contracts/gas-snapshots/functions.gas-snapshot @@ -1,68 +1,68 @@ -ChainSpecificUtil__getCurrentTxL1GasFees_Arbitrum:test__getCurrentTxL1GasFees_SuccessWhenArbitrumGoerli() (gas: 16036350) -ChainSpecificUtil__getCurrentTxL1GasFees_Arbitrum:test__getCurrentTxL1GasFees_SuccessWhenArbitrumMainnet() (gas: 16036328) -ChainSpecificUtil__getCurrentTxL1GasFees_Arbitrum:test__getCurrentTxL1GasFees_SuccessWhenArbitrumSepolia() (gas: 16036344) -ChainSpecificUtil__getCurrentTxL1GasFees_Base:test__getCurrentTxL1GasFees_SuccessWhenBaseGoerli() (gas: 16047934) -ChainSpecificUtil__getCurrentTxL1GasFees_Base:test__getCurrentTxL1GasFees_SuccessWhenBaseMainnet() (gas: 16047911) -ChainSpecificUtil__getCurrentTxL1GasFees_Base:test__getCurrentTxL1GasFees_SuccessWhenBaseSepolia() (gas: 16047883) -ChainSpecificUtil__getCurrentTxL1GasFees_Optimism:test__getCurrentTxL1GasFees_SuccessWhenOptimismGoerli() (gas: 16047834) -ChainSpecificUtil__getCurrentTxL1GasFees_Optimism:test__getCurrentTxL1GasFees_SuccessWhenOptimismMainnet() (gas: 16047823) -ChainSpecificUtil__getCurrentTxL1GasFees_Optimism:test__getCurrentTxL1GasFees_SuccessWhenOptimismSepolia() (gas: 16047867) +ChainSpecificUtil__getCurrentTxL1GasFees_Arbitrum:test__getCurrentTxL1GasFees_SuccessWhenArbitrumGoerli() (gas: 16036240) +ChainSpecificUtil__getCurrentTxL1GasFees_Arbitrum:test__getCurrentTxL1GasFees_SuccessWhenArbitrumMainnet() (gas: 16036218) +ChainSpecificUtil__getCurrentTxL1GasFees_Arbitrum:test__getCurrentTxL1GasFees_SuccessWhenArbitrumSepolia() (gas: 16036234) +ChainSpecificUtil__getCurrentTxL1GasFees_Base:test__getCurrentTxL1GasFees_SuccessWhenBaseGoerli() (gas: 16047824) +ChainSpecificUtil__getCurrentTxL1GasFees_Base:test__getCurrentTxL1GasFees_SuccessWhenBaseMainnet() (gas: 16047801) +ChainSpecificUtil__getCurrentTxL1GasFees_Base:test__getCurrentTxL1GasFees_SuccessWhenBaseSepolia() (gas: 16047773) +ChainSpecificUtil__getCurrentTxL1GasFees_Optimism:test__getCurrentTxL1GasFees_SuccessWhenOptimismGoerli() (gas: 16047724) +ChainSpecificUtil__getCurrentTxL1GasFees_Optimism:test__getCurrentTxL1GasFees_SuccessWhenOptimismMainnet() (gas: 16047713) +ChainSpecificUtil__getCurrentTxL1GasFees_Optimism:test__getCurrentTxL1GasFees_SuccessWhenOptimismSepolia() (gas: 16047757) FunctionsBilling_Constructor:test_Constructor_Success() (gas: 14823) -FunctionsBilling_DeleteCommitment:test_DeleteCommitment_RevertIfNotRouter() (gas: 13282) -FunctionsBilling_DeleteCommitment:test_DeleteCommitment_Success() (gas: 15897) -FunctionsBilling_EstimateCost:test_EstimateCost_RevertsIfGasPriceAboveCeiling() (gas: 32458) -FunctionsBilling_EstimateCost:test_EstimateCost_Success() (gas: 88265) -FunctionsBilling_EstimateCost:test_EstimateCost_SuccessLowGasPrice() (gas: 88368) -FunctionsBilling_GetAdminFee:test_GetAdminFee_Success() (gas: 18292) -FunctionsBilling_GetConfig:test_GetConfig_Success() (gas: 27530) -FunctionsBilling_GetDONFee:test_GetDONFee_Success() (gas: 40876) -FunctionsBilling_GetOperationFee:test_GetOperationFee_Success() (gas: 40166) -FunctionsBilling_GetWeiPerUnitLink:test_GetWeiPerUnitLink_Success() (gas: 29391) -FunctionsBilling_OracleWithdraw:test_OracleWithdraw_RevertIfInsufficientBalance() (gas: 70084) -FunctionsBilling_OracleWithdraw:test_OracleWithdraw_RevertWithNoBalance() (gas: 106241) -FunctionsBilling_OracleWithdraw:test_OracleWithdraw_SuccessCoordinatorOwner() (gas: 129563) -FunctionsBilling_OracleWithdraw:test_OracleWithdraw_SuccessTransmitterWithBalanceNoAmountGiven() (gas: 169262) -FunctionsBilling_OracleWithdraw:test_OracleWithdraw_SuccessTransmitterWithBalanceValidAmountGiven() (gas: 142453) -FunctionsBilling_OracleWithdrawAll:test_OracleWithdrawAll_RevertIfNotOwner() (gas: 13319) -FunctionsBilling_OracleWithdrawAll:test_OracleWithdrawAll_SuccessPaysTransmittersWithBalance() (gas: 217234) -FunctionsBilling_UpdateConfig:test_UpdateConfig_RevertIfNotOwner() (gas: 21543) -FunctionsBilling_UpdateConfig:test_UpdateConfig_Success() (gas: 48597) -FunctionsBilling__DisperseFeePool:test__DisperseFeePool_RevertIfNotSet() (gas: 8832) -FunctionsBilling__FulfillAndBill:test__FulfillAndBill_RevertIfInvalidCommitment() (gas: 13332) -FunctionsBilling__FulfillAndBill:test__FulfillAndBill_Success() (gas: 208271) -FunctionsBilling__StartBilling:test__FulfillAndBill_HasUniqueGlobalRequestId() (gas: 544189) +FunctionsBilling_DeleteCommitment:test_DeleteCommitment_RevertIfNotRouter() (gas: 13260) +FunctionsBilling_DeleteCommitment:test_DeleteCommitment_Success() (gas: 15875) +FunctionsBilling_EstimateCost:test_EstimateCost_RevertsIfGasPriceAboveCeiling() (gas: 32436) +FunctionsBilling_EstimateCost:test_EstimateCost_Success() (gas: 88199) +FunctionsBilling_EstimateCost:test_EstimateCost_SuccessLowGasPrice() (gas: 88302) +FunctionsBilling_GetAdminFeeJuels:test_GetAdminFeeJuels_Success() (gas: 18334) +FunctionsBilling_GetConfig:test_GetConfig_Success() (gas: 27553) +FunctionsBilling_GetDONFeeJuels:test_GetDONFeeJuels_Success() (gas: 40831) +FunctionsBilling_GetOperationFee:test_GetOperationFeeJuels_Success() (gas: 40211) +FunctionsBilling_GetWeiPerUnitLink:test_GetWeiPerUnitLink_Success() (gas: 29414) +FunctionsBilling_OracleWithdraw:test_OracleWithdraw_RevertIfInsufficientBalance() (gas: 70107) +FunctionsBilling_OracleWithdraw:test_OracleWithdraw_RevertWithNoBalance() (gas: 106264) +FunctionsBilling_OracleWithdraw:test_OracleWithdraw_SuccessCoordinatorOwner() (gas: 129542) +FunctionsBilling_OracleWithdraw:test_OracleWithdraw_SuccessTransmitterWithBalanceNoAmountGiven() (gas: 169241) +FunctionsBilling_OracleWithdraw:test_OracleWithdraw_SuccessTransmitterWithBalanceValidAmountGiven() (gas: 142476) +FunctionsBilling_OracleWithdrawAll:test_OracleWithdrawAll_RevertIfNotOwner() (gas: 13297) +FunctionsBilling_OracleWithdrawAll:test_OracleWithdrawAll_SuccessPaysTransmittersWithBalance() (gas: 217168) +FunctionsBilling_UpdateConfig:test_UpdateConfig_RevertIfNotOwner() (gas: 21521) +FunctionsBilling_UpdateConfig:test_UpdateConfig_Success() (gas: 49192) +FunctionsBilling__DisperseFeePool:test__DisperseFeePool_RevertIfNotSet() (gas: 8810) +FunctionsBilling__FulfillAndBill:test__FulfillAndBill_RevertIfInvalidCommitment() (gas: 13375) +FunctionsBilling__FulfillAndBill:test__FulfillAndBill_Success() (gas: 208248) +FunctionsBilling__StartBilling:test__FulfillAndBill_HasUniqueGlobalRequestId() (gas: 544233) FunctionsClient_Constructor:test_Constructor_Success() (gas: 7573) FunctionsClient_HandleOracleFulfillment:test_HandleOracleFulfillment_RevertIfNotRouter() (gas: 14617) FunctionsClient_HandleOracleFulfillment:test_HandleOracleFulfillment_Success() (gas: 22917) FunctionsClient__SendRequest:test__SendRequest_RevertIfInvalidCallbackGasLimit() (gas: 55059) -FunctionsCoordinator_Constructor:test_Constructor_Success() (gas: 12029) -FunctionsCoordinator_GetDONPublicKey:test_GetDONPublicKey_RevertIfEmpty() (gas: 15334) -FunctionsCoordinator_GetDONPublicKey:test_GetDONPublicKey_Success() (gas: 106484) -FunctionsCoordinator_GetThresholdPublicKey:test_GetThresholdPublicKey_RevertIfEmpty() (gas: 15378) -FunctionsCoordinator_GetThresholdPublicKey:test_GetThresholdPublicKey_Success() (gas: 656427) -FunctionsCoordinator_SetDONPublicKey:test_SetDONPublicKey_RevertNotOwner() (gas: 20342) -FunctionsCoordinator_SetDONPublicKey:test_SetDONPublicKey_Success() (gas: 101263) +FunctionsCoordinator_Constructor:test_Constructor_Success() (gas: 12007) +FunctionsCoordinator_GetDONPublicKey:test_GetDONPublicKey_RevertIfEmpty() (gas: 15378) +FunctionsCoordinator_GetDONPublicKey:test_GetDONPublicKey_Success() (gas: 106551) +FunctionsCoordinator_GetThresholdPublicKey:test_GetThresholdPublicKey_RevertIfEmpty() (gas: 15356) +FunctionsCoordinator_GetThresholdPublicKey:test_GetThresholdPublicKey_Success() (gas: 656405) +FunctionsCoordinator_SetDONPublicKey:test_SetDONPublicKey_RevertNotOwner() (gas: 20365) +FunctionsCoordinator_SetDONPublicKey:test_SetDONPublicKey_Success() (gas: 101330) FunctionsCoordinator_SetThresholdPublicKey:test_SetThresholdPublicKey_RevertNotOwner() (gas: 13892) -FunctionsCoordinator_SetThresholdPublicKey:test_SetThresholdPublicKey_Success() (gas: 651119) -FunctionsCoordinator_StartRequest:test_StartRequest_RevertIfNotRouter() (gas: 22726) -FunctionsCoordinator_StartRequest:test_StartRequest_Success() (gas: 151198) +FunctionsCoordinator_SetThresholdPublicKey:test_SetThresholdPublicKey_Success() (gas: 651097) +FunctionsCoordinator_StartRequest:test_StartRequest_RevertIfNotRouter() (gas: 22770) +FunctionsCoordinator_StartRequest:test_StartRequest_Success() (gas: 151176) FunctionsCoordinator__IsTransmitter:test__IsTransmitter_SuccessFound() (gas: 12275) FunctionsCoordinator__IsTransmitter:test__IsTransmitter_SuccessNotFound() (gas: 20107) FunctionsRequest_DEFAULT_BUFFER_SIZE:test_DEFAULT_BUFFER_SIZE() (gas: 246) FunctionsRequest_EncodeCBOR:test_EncodeCBOR_Success() (gas: 223) FunctionsRequest_REQUEST_DATA_VERSION:test_REQUEST_DATA_VERSION() (gas: 225) FunctionsRouter_Constructor:test_Constructor_Success() (gas: 12007) -FunctionsRouter_Fulfill:test_Fulfill_RequestNotProcessedCostExceedsCommitment() (gas: 175519) -FunctionsRouter_Fulfill:test_Fulfill_RequestNotProcessedInsufficientGas() (gas: 165992) +FunctionsRouter_Fulfill:test_Fulfill_RequestNotProcessedCostExceedsCommitment() (gas: 175497) +FunctionsRouter_Fulfill:test_Fulfill_RequestNotProcessedInsufficientGas() (gas: 165970) FunctionsRouter_Fulfill:test_Fulfill_RequestNotProcessedInvalidCommitment() (gas: 38115) FunctionsRouter_Fulfill:test_Fulfill_RequestNotProcessedInvalidRequestId() (gas: 35238) -FunctionsRouter_Fulfill:test_Fulfill_RequestNotProcessedSubscriptionBalanceInvariant() (gas: 183995) +FunctionsRouter_Fulfill:test_Fulfill_RequestNotProcessedSubscriptionBalanceInvariant() (gas: 183973) FunctionsRouter_Fulfill:test_Fulfill_RevertIfNotCommittedCoordinator() (gas: 28086) -FunctionsRouter_Fulfill:test_Fulfill_RevertIfPaused() (gas: 159557) -FunctionsRouter_Fulfill:test_Fulfill_SuccessClientNoLongerExists() (gas: 357982) -FunctionsRouter_Fulfill:test_Fulfill_SuccessFulfilled() (gas: 371606) -FunctionsRouter_Fulfill:test_Fulfill_SuccessUserCallbackReverts() (gas: 2671031) -FunctionsRouter_Fulfill:test_Fulfill_SuccessUserCallbackRunsOutOfGas() (gas: 701981) +FunctionsRouter_Fulfill:test_Fulfill_RevertIfPaused() (gas: 159535) +FunctionsRouter_Fulfill:test_Fulfill_SuccessClientNoLongerExists() (gas: 357894) +FunctionsRouter_Fulfill:test_Fulfill_SuccessFulfilled() (gas: 371518) +FunctionsRouter_Fulfill:test_Fulfill_SuccessUserCallbackReverts() (gas: 2670987) +FunctionsRouter_Fulfill:test_Fulfill_SuccessUserCallbackRunsOutOfGas() (gas: 701937) FunctionsRouter_GetAdminFee:test_GetAdminFee_Success() (gas: 17983) FunctionsRouter_GetAllowListId:test_GetAllowListId_Success() (gas: 12904) FunctionsRouter_GetConfig:test_GetConfig_Success() (gas: 37159) @@ -83,15 +83,15 @@ FunctionsRouter_ProposeContractsUpdate:test_ProposeContractsUpdate_RevertIfNotNe FunctionsRouter_ProposeContractsUpdate:test_ProposeContractsUpdate_RevertIfNotOwner() (gas: 23392) FunctionsRouter_ProposeContractsUpdate:test_ProposeContractsUpdate_Success() (gas: 118479) FunctionsRouter_SendRequest:test_SendRequest_RevertIfConsumerNotAllowed() (gas: 59391) -FunctionsRouter_SendRequest:test_SendRequest_RevertIfDuplicateRequestId() (gas: 218342) +FunctionsRouter_SendRequest:test_SendRequest_RevertIfDuplicateRequestId() (gas: 218386) FunctionsRouter_SendRequest:test_SendRequest_RevertIfEmptyData() (gas: 29426) FunctionsRouter_SendRequest:test_SendRequest_RevertIfIncorrectDonId() (gas: 57904) -FunctionsRouter_SendRequest:test_SendRequest_RevertIfInsufficientSubscriptionBalance() (gas: 208515) +FunctionsRouter_SendRequest:test_SendRequest_RevertIfInsufficientSubscriptionBalance() (gas: 208559) FunctionsRouter_SendRequest:test_SendRequest_RevertIfInvalidCallbackGasLimit() (gas: 50947) FunctionsRouter_SendRequest:test_SendRequest_RevertIfInvalidDonId() (gas: 25082) FunctionsRouter_SendRequest:test_SendRequest_RevertIfNoSubscription() (gas: 29132) FunctionsRouter_SendRequest:test_SendRequest_RevertIfPaused() (gas: 34291) -FunctionsRouter_SendRequest:test_SendRequest_Success() (gas: 318131) +FunctionsRouter_SendRequest:test_SendRequest_Success() (gas: 318153) FunctionsRouter_SendRequestToProposed:test_SendRequestToProposed_RevertIfConsumerNotAllowed() (gas: 65887) FunctionsRouter_SendRequestToProposed:test_SendRequestToProposed_RevertIfEmptyData() (gas: 36012) FunctionsRouter_SendRequestToProposed:test_SendRequestToProposed_RevertIfIncorrectDonId() (gas: 29896) @@ -99,8 +99,8 @@ FunctionsRouter_SendRequestToProposed:test_SendRequestToProposed_RevertIfInvalid FunctionsRouter_SendRequestToProposed:test_SendRequestToProposed_RevertIfInvalidDonId() (gas: 27503) FunctionsRouter_SendRequestToProposed:test_SendRequestToProposed_RevertIfNoSubscription() (gas: 35717) FunctionsRouter_SendRequestToProposed:test_SendRequestToProposed_RevertIfPaused() (gas: 40810) -FunctionsRouter_SendRequestToProposed:test_SendRequestToProposed_Success() (gas: 324578) -FunctionsRouter_SendRequestToProposed:test_SendRequest_RevertIfInsufficientSubscriptionBalance() (gas: 214962) +FunctionsRouter_SendRequestToProposed:test_SendRequestToProposed_Success() (gas: 324601) +FunctionsRouter_SendRequestToProposed:test_SendRequest_RevertIfInsufficientSubscriptionBalance() (gas: 215007) FunctionsRouter_SetAllowListId:test_SetAllowListId_Success() (gas: 30688) FunctionsRouter_SetAllowListId:test_UpdateConfig_RevertIfNotOwner() (gas: 13403) FunctionsRouter_Unpause:test_Unpause_RevertIfNotOwner() (gas: 13293) @@ -113,7 +113,7 @@ FunctionsSubscriptions_AcceptSubscriptionOwnerTransfer:test_AcceptSubscriptionOw FunctionsSubscriptions_AcceptSubscriptionOwnerTransfer:test_AcceptSubscriptionOwnerTransfer_RevertIfPaused() (gas: 61031) FunctionsSubscriptions_AcceptSubscriptionOwnerTransfer:test_AcceptSubscriptionOwnerTransfer_RevertIfSenderBecomesBlocked() (gas: 139404) FunctionsSubscriptions_AcceptSubscriptionOwnerTransfer:test_AcceptSubscriptionOwnerTransfer_RevertIfSenderIsNotNewOwner() (gas: 62781) -FunctionsSubscriptions_AcceptSubscriptionOwnerTransfer:test_AcceptSubscriptionOwnerTransfer_Success() (gas: 239770) +FunctionsSubscriptions_AcceptSubscriptionOwnerTransfer:test_AcceptSubscriptionOwnerTransfer_Success() (gas: 239814) FunctionsSubscriptions_AddConsumer:test_AddConsumer_RevertIfMaximumConsumers() (gas: 138025) FunctionsSubscriptions_AddConsumer:test_AddConsumer_RevertIfMaximumConsumersAfterConfigUpdate() (gas: 164969) FunctionsSubscriptions_AddConsumer:test_AddConsumer_RevertIfNoSubscription() (gas: 12946) @@ -125,7 +125,7 @@ FunctionsSubscriptions_CancelSubscription:test_CancelSubscription_RevertIfNoSubs FunctionsSubscriptions_CancelSubscription:test_CancelSubscription_RevertIfNotAllowedSender() (gas: 102524) FunctionsSubscriptions_CancelSubscription:test_CancelSubscription_RevertIfNotSubscriptionOwner() (gas: 89309) FunctionsSubscriptions_CancelSubscription:test_CancelSubscription_RevertIfPaused() (gas: 20148) -FunctionsSubscriptions_CancelSubscription:test_CancelSubscription_RevertIfPendingRequests() (gas: 218854) +FunctionsSubscriptions_CancelSubscription:test_CancelSubscription_RevertIfPendingRequests() (gas: 218898) FunctionsSubscriptions_CancelSubscription:test_CancelSubscription_SuccessForfeitAllBalanceAsDeposit() (gas: 114541) FunctionsSubscriptions_CancelSubscription:test_CancelSubscription_SuccessForfeitSomeBalanceAsDeposit() (gas: 125867) FunctionsSubscriptions_CancelSubscription_ReceiveDeposit:test_CancelSubscription_SuccessRecieveDeposit() (gas: 75017) @@ -158,7 +158,7 @@ FunctionsSubscriptions_OwnerCancelSubscription:test_OwnerCancelSubscription_Reve FunctionsSubscriptions_OwnerCancelSubscription:test_OwnerCancelSubscription_Success() (gas: 54867) FunctionsSubscriptions_OwnerCancelSubscription:test_OwnerCancelSubscription_SuccessDeletesSubscription() (gas: 49607) FunctionsSubscriptions_OwnerCancelSubscription:test_OwnerCancelSubscription_SuccessSubOwnerRefunded() (gas: 50896) -FunctionsSubscriptions_OwnerCancelSubscription:test_OwnerCancelSubscription_SuccessWhenRequestInFlight() (gas: 187058) +FunctionsSubscriptions_OwnerCancelSubscription:test_OwnerCancelSubscription_SuccessWhenRequestInFlight() (gas: 187102) FunctionsSubscriptions_OwnerWithdraw:test_OwnerWithdraw_RevertIfAmountMoreThanBalance() (gas: 17924) FunctionsSubscriptions_OwnerWithdraw:test_OwnerWithdraw_RevertIfBalanceInvariant() (gas: 210) FunctionsSubscriptions_OwnerWithdraw:test_OwnerWithdraw_RevertIfNotOwner() (gas: 15555) @@ -167,7 +167,7 @@ FunctionsSubscriptions_OwnerWithdraw:test_OwnerWithdraw_SuccessIfRecipientAddres FunctionsSubscriptions_OwnerWithdraw:test_OwnerWithdraw_SuccessPaysRecipient() (gas: 54413) FunctionsSubscriptions_OwnerWithdraw:test_OwnerWithdraw_SuccessSetsBalanceToZero() (gas: 37790) FunctionsSubscriptions_PendingRequestExists:test_PendingRequestExists_SuccessFalseIfNoPendingRequests() (gas: 14981) -FunctionsSubscriptions_PendingRequestExists:test_PendingRequestExists_SuccessTrueIfPendingRequests() (gas: 200979) +FunctionsSubscriptions_PendingRequestExists:test_PendingRequestExists_SuccessTrueIfPendingRequests() (gas: 201023) FunctionsSubscriptions_ProposeSubscriptionOwnerTransfer:test_ProposeSubscriptionOwnerTransfer_RevertIfEmptyNewOwner() (gas: 27655) FunctionsSubscriptions_ProposeSubscriptionOwnerTransfer:test_ProposeSubscriptionOwnerTransfer_RevertIfInvalidNewOwner() (gas: 57797) FunctionsSubscriptions_ProposeSubscriptionOwnerTransfer:test_ProposeSubscriptionOwnerTransfer_RevertIfNoSubscription() (gas: 15001) @@ -183,7 +183,7 @@ FunctionsSubscriptions_RemoveConsumer:test_RemoveConsumer_RevertIfNoSubscription FunctionsSubscriptions_RemoveConsumer:test_RemoveConsumer_RevertIfNotAllowedSender() (gas: 102439) FunctionsSubscriptions_RemoveConsumer:test_RemoveConsumer_RevertIfNotSubscriptionOwner() (gas: 87245) FunctionsSubscriptions_RemoveConsumer:test_RemoveConsumer_RevertIfPaused() (gas: 18049) -FunctionsSubscriptions_RemoveConsumer:test_RemoveConsumer_RevertIfPendingRequests() (gas: 216387) +FunctionsSubscriptions_RemoveConsumer:test_RemoveConsumer_RevertIfPendingRequests() (gas: 216431) FunctionsSubscriptions_RemoveConsumer:test_RemoveConsumer_Success() (gas: 42023) FunctionsSubscriptions_SetFlags:test_SetFlags_RevertIfNoSubscription() (gas: 12891) FunctionsSubscriptions_SetFlags:test_SetFlags_RevertIfNotOwner() (gas: 15684) @@ -191,7 +191,7 @@ FunctionsSubscriptions_SetFlags:test_SetFlags_Success() (gas: 35594) FunctionsSubscriptions_TimeoutRequests:test_TimeoutRequests_RevertIfPaused() (gas: 25955) FunctionsSubscriptions_TimeoutRequests:test_TimeoutRequests_RevertIfTimeoutNotExceeded() (gas: 25261) FunctionsSubscriptions_TimeoutRequests:test_TimeoutRequests_RevertInvalidRequest() (gas: 28242) -FunctionsSubscriptions_TimeoutRequests:test_TimeoutRequests_Success() (gas: 57754) +FunctionsSubscriptions_TimeoutRequests:test_TimeoutRequests_Success() (gas: 57732) FunctionsSubscriptions_createSubscription:test_CreateSubscription_RevertIfNotAllowedSender() (gas: 26434) FunctionsSubscriptions_createSubscription:test_CreateSubscription_RevertIfPaused() (gas: 15759) FunctionsSubscriptions_createSubscription:test_CreateSubscription_Success() (gas: 152708) @@ -208,12 +208,12 @@ FunctionsTermsOfServiceAllowList_BlockSender:test_BlockSender_Success() (gas: 96 FunctionsTermsOfServiceAllowList_Constructor:test_Constructor_Success() (gas: 12253) FunctionsTermsOfServiceAllowList_GetAllAllowedSenders:test_GetAllAllowedSenders_Success() (gas: 19199) FunctionsTermsOfServiceAllowList_GetAllowedSendersCount:test_GetAllowedSendersCount_Success() (gas: 12995) -FunctionsTermsOfServiceAllowList_GetAllowedSendersInRange:test_GetAllowedSendersInRange_RevertIfAllowedSendersIsEmpty() (gas: 13227517) +FunctionsTermsOfServiceAllowList_GetAllowedSendersInRange:test_GetAllowedSendersInRange_RevertIfAllowedSendersIsEmpty() (gas: 13227495) FunctionsTermsOfServiceAllowList_GetAllowedSendersInRange:test_GetAllowedSendersInRange_RevertIfEndIsAfterLastAllowedSender() (gas: 16571) FunctionsTermsOfServiceAllowList_GetAllowedSendersInRange:test_GetAllowedSendersInRange_RevertIfStartIsAfterEnd() (gas: 13301) FunctionsTermsOfServiceAllowList_GetAllowedSendersInRange:test_GetAllowedSendersInRange_Success() (gas: 20448) FunctionsTermsOfServiceAllowList_GetBlockedSendersCount:test_GetBlockedSendersCount_Success() (gas: 12931) -FunctionsTermsOfServiceAllowList_GetBlockedSendersInRange:test_GetBlockedSendersInRange_RevertIfAllowedSendersIsEmpty() (gas: 13227521) +FunctionsTermsOfServiceAllowList_GetBlockedSendersInRange:test_GetBlockedSendersInRange_RevertIfAllowedSendersIsEmpty() (gas: 13227499) FunctionsTermsOfServiceAllowList_GetBlockedSendersInRange:test_GetBlockedSendersInRange_RevertIfEndIsAfterLastAllowedSender() (gas: 16549) FunctionsTermsOfServiceAllowList_GetBlockedSendersInRange:test_GetBlockedSendersInRange_RevertIfStartIsAfterEnd() (gas: 13367) FunctionsTermsOfServiceAllowList_GetBlockedSendersInRange:test_GetBlockedSendersInRange_Success() (gas: 18493) @@ -230,10 +230,10 @@ FunctionsTermsOfServiceAllowList_UpdateConfig:test_UpdateConfig_Success() (gas: Gas_AcceptTermsOfService:test_AcceptTermsOfService_Gas() (gas: 84702) Gas_AddConsumer:test_AddConsumer_Gas() (gas: 79131) Gas_CreateSubscription:test_CreateSubscription_Gas() (gas: 73419) -Gas_FulfillRequest_DuplicateRequestID:test_FulfillRequest_DuplicateRequestID_MaximumGas() (gas: 20819) -Gas_FulfillRequest_DuplicateRequestID:test_FulfillRequest_DuplicateRequestID_MinimumGas() (gas: 20259) -Gas_FulfillRequest_Success:test_FulfillRequest_Success_MaximumGas() (gas: 522030) -Gas_FulfillRequest_Success:test_FulfillRequest_Success_MinimumGas() (gas: 223233) +Gas_FulfillRequest_DuplicateRequestID:test_FulfillRequest_DuplicateRequestID_MaximumGas() (gas: 20797) +Gas_FulfillRequest_DuplicateRequestID:test_FulfillRequest_DuplicateRequestID_MinimumGas() (gas: 20237) +Gas_FulfillRequest_Success:test_FulfillRequest_Success_MaximumGas() (gas: 521986) +Gas_FulfillRequest_Success:test_FulfillRequest_Success_MinimumGas() (gas: 223189) Gas_FundSubscription:test_FundSubscription_Gas() (gas: 38546) -Gas_SendRequest:test_SendRequest_MaximumGas() (gas: 1004094) -Gas_SendRequest:test_SendRequest_MinimumGas() (gas: 182062) \ No newline at end of file +Gas_SendRequest:test_SendRequest_MaximumGas() (gas: 1004138) +Gas_SendRequest:test_SendRequest_MinimumGas() (gas: 182106) \ No newline at end of file diff --git a/contracts/scripts/native_solc_compile_all_functions b/contracts/scripts/native_solc_compile_all_functions index 8998a4d9ce4..26e4c0c6e50 100755 --- a/contracts/scripts/native_solc_compile_all_functions +++ b/contracts/scripts/native_solc_compile_all_functions @@ -33,8 +33,7 @@ export SOLC_VERSION=$SOLC_VERSION compileContract v1_X dev/v1_X/libraries/FunctionsRequest.sol compileContract v1_X dev/v1_X/FunctionsRouter.sol -compileContract v1_X dev/v1_X/FunctionsCoordinator.sol # Latest -compileContract v1_1_0 v1_1_0/FunctionsCoordinator.sol # Coordinator v1.1.0 +compileContract v1_X dev/v1_X/FunctionsCoordinator.sol compileContract v1_X dev/v1_X/accessControl/TermsOfServiceAllowList.sol compileContract v1_X dev/v1_X/example/FunctionsClientExample.sol diff --git a/contracts/src/v0.8/functions/dev/v1_X/FunctionsBilling.sol b/contracts/src/v0.8/functions/dev/v1_X/FunctionsBilling.sol index 770be5a00d1..e805fe09ae1 100644 --- a/contracts/src/v0.8/functions/dev/v1_X/FunctionsBilling.sol +++ b/contracts/src/v0.8/functions/dev/v1_X/FunctionsBilling.sol @@ -106,19 +106,19 @@ abstract contract FunctionsBilling is Routable, IFunctionsBilling { // ================================================================ /// @inheritdoc IFunctionsBilling - function getDONFee(bytes memory /* requestData */) public view override returns (uint72) { + function getDONFeeJuels(bytes memory /* requestData */) public view override returns (uint72) { // s_config.donFee is in cents of USD. Get Juel amount then convert to dollars. - return SafeCast.toUint72(_getJuelsFromUsd(s_config.donFee) / 100); + return SafeCast.toUint72(_getJuelsFromUsd(s_config.donFeeCentsUsd) / 100); } /// @inheritdoc IFunctionsBilling - function getOperationFee() public view override returns (uint72) { + function getOperationFeeJuels() public view override returns (uint72) { // s_config.donFee is in cents of USD. Get Juel amount then convert to dollars. - return SafeCast.toUint72(_getJuelsFromUsd(s_config.operationFee) / 100); + return SafeCast.toUint72(_getJuelsFromUsd(s_config.operationFeeCentsUsd) / 100); } /// @inheritdoc IFunctionsBilling - function getAdminFee() public view override returns (uint72) { + function getAdminFeeJuels() public view override returns (uint72) { return _getRouter().getAdminFee(); } @@ -177,9 +177,9 @@ abstract contract FunctionsBilling is Routable, IFunctionsBilling { if (gasPriceWei > REASONABLE_GAS_PRICE_CEILING) { revert InvalidCalldata(); } - uint72 adminFee = getAdminFee(); - uint72 donFee = getDONFee(data); - uint72 operationFee = getOperationFee(); + uint72 adminFee = getAdminFeeJuels(); + uint72 donFee = getDONFeeJuels(data); + uint72 operationFee = getOperationFeeJuels(); return _calculateCostEstimate(callbackGasLimit, gasPriceWei, donFee, adminFee, operationFee); } @@ -189,9 +189,9 @@ abstract contract FunctionsBilling is Routable, IFunctionsBilling { function _calculateCostEstimate( uint32 callbackGasLimit, uint256 gasPriceWei, - uint72 donFee, - uint72 adminFee, - uint72 operationFee + uint72 donFeeJuels, + uint72 adminFeeJuels, + uint72 operationFeeJuels ) internal view returns (uint96) { // If gas price is less than the minimum fulfillment gas price, override to using the minimum if (gasPriceWei < s_config.minimumEstimateGasPriceWei) { @@ -206,7 +206,7 @@ abstract contract FunctionsBilling is Routable, IFunctionsBilling { uint256 l1FeeWei = ChainSpecificUtil._getCurrentTxL1GasFees(msg.data); uint96 estimatedGasReimbursementJuels = _getJuelsFromWei((gasPriceWithOverestimation * executionGas) + l1FeeWei); - uint96 feesJuels = uint96(donFee) + uint96(adminFee) + uint96(operationFee); + uint96 feesJuels = uint96(donFeeJuels) + uint96(adminFeeJuels) + uint96(operationFeeJuels); return estimatedGasReimbursementJuels + feesJuels; } @@ -227,8 +227,8 @@ abstract contract FunctionsBilling is Routable, IFunctionsBilling { revert UnsupportedRequestDataVersion(); } - uint72 donFee = getDONFee(request.data); - uint72 operationFee = getOperationFee(); + uint72 donFee = getDONFeeJuels(request.data); + uint72 operationFee = getOperationFeeJuels(); uint96 estimatedTotalCostJuels = _calculateCostEstimate( request.callbackGasLimit, tx.gasprice, @@ -260,7 +260,7 @@ abstract contract FunctionsBilling is Routable, IFunctionsBilling { ); commitment = FunctionsResponse.CommitmentWithOperationFee({ - adminFee: request.adminFee, + adminFeeJuels: request.adminFee, coordinator: address(this), client: request.requestingContract, subscriptionId: request.subscriptionId, @@ -268,8 +268,8 @@ abstract contract FunctionsBilling is Routable, IFunctionsBilling { estimatedTotalCostJuels: estimatedTotalCostJuels, timeoutTimestamp: timeoutTimestamp, requestId: requestId, - donFee: donFee, - operationFee: operationFee, + donFeeJuels: donFee, + operationFeeJuels: operationFee, gasOverheadBeforeCallback: s_config.gasOverheadBeforeCallback, gasOverheadAfterCallback: s_config.gasOverheadAfterCallback }); @@ -311,10 +311,10 @@ abstract contract FunctionsBilling is Routable, IFunctionsBilling { response, err, juelsPerGas, - gasOverheadJuels + commitment.donFee + commitment.operationFee, // cost without callback or admin fee, those will be added by the Router + gasOverheadJuels + commitment.donFeeJuels + commitment.operationFeeJuels, // cost without callback or admin fee, those will be added by the Router msg.sender, FunctionsResponse.Commitment({ - adminFee: commitment.adminFee, + adminFee: commitment.adminFeeJuels, coordinator: commitment.coordinator, client: commitment.client, subscriptionId: commitment.subscriptionId, @@ -322,7 +322,7 @@ abstract contract FunctionsBilling is Routable, IFunctionsBilling { estimatedTotalCostJuels: commitment.estimatedTotalCostJuels, timeoutTimestamp: commitment.timeoutTimestamp, requestId: commitment.requestId, - donFee: commitment.donFee, + donFee: commitment.donFeeJuels, gasOverheadBeforeCallback: commitment.gasOverheadBeforeCallback, gasOverheadAfterCallback: commitment.gasOverheadAfterCallback }) @@ -340,17 +340,17 @@ abstract contract FunctionsBilling is Routable, IFunctionsBilling { s_withdrawableTokens[msg.sender] += gasOverheadJuels + callbackCostJuels; // Put donFee into the pool of fees, to be split later // Saves on storage writes that would otherwise be charged to the user - s_feePool += commitment.donFee; + s_feePool += commitment.donFeeJuels; // Pay the operation fee to the Coordinator owner - s_withdrawableTokens[_owner()] += commitment.operationFee; + s_withdrawableTokens[_owner()] += commitment.operationFeeJuels; emit RequestBilled({ requestId: requestId, juelsPerGas: juelsPerGas, l1FeeShareWei: l1FeeShareWei, callbackCostJuels: callbackCostJuels, - donFeeJuels: commitment.donFee, - adminFeeJuels: commitment.adminFee, - operationFeeJuels: commitment.operationFee + donFeeJuels: commitment.donFeeJuels, + adminFeeJuels: commitment.adminFeeJuels, + operationFeeJuels: commitment.operationFeeJuels }); } return resultCode; diff --git a/contracts/src/v0.8/functions/dev/v1_X/FunctionsCoordinator.sol b/contracts/src/v0.8/functions/dev/v1_X/FunctionsCoordinator.sol index 0b195199d67..f6497ee5036 100644 --- a/contracts/src/v0.8/functions/dev/v1_X/FunctionsCoordinator.sol +++ b/contracts/src/v0.8/functions/dev/v1_X/FunctionsCoordinator.sol @@ -112,7 +112,7 @@ contract FunctionsCoordinator is OCR2Base, IFunctionsCoordinator, FunctionsBilli return FunctionsResponse.Commitment({ - adminFee: commitmentWithOperationFee.adminFee, + adminFee: commitmentWithOperationFee.adminFeeJuels, coordinator: commitmentWithOperationFee.coordinator, client: commitmentWithOperationFee.client, subscriptionId: commitmentWithOperationFee.subscriptionId, @@ -120,7 +120,7 @@ contract FunctionsCoordinator is OCR2Base, IFunctionsCoordinator, FunctionsBilli estimatedTotalCostJuels: commitmentWithOperationFee.estimatedTotalCostJuels, timeoutTimestamp: commitmentWithOperationFee.timeoutTimestamp, requestId: commitmentWithOperationFee.requestId, - donFee: commitmentWithOperationFee.donFee, + donFee: commitmentWithOperationFee.donFeeJuels, gasOverheadBeforeCallback: commitmentWithOperationFee.gasOverheadBeforeCallback, gasOverheadAfterCallback: commitmentWithOperationFee.gasOverheadAfterCallback }); diff --git a/contracts/src/v0.8/functions/dev/v1_X/interfaces/IFunctionsBilling.sol b/contracts/src/v0.8/functions/dev/v1_X/interfaces/IFunctionsBilling.sol index 2b3c7ad1a4c..79806f1eb18 100644 --- a/contracts/src/v0.8/functions/dev/v1_X/interfaces/IFunctionsBilling.sol +++ b/contracts/src/v0.8/functions/dev/v1_X/interfaces/IFunctionsBilling.sol @@ -15,15 +15,15 @@ interface IFunctionsBilling { /// @notice Determine the fee that will be split between Node Operators for servicing a request /// @param requestCBOR - CBOR encoded Chainlink Functions request data, use FunctionsRequest library to encode a request /// @return fee - Cost in Juels (1e18) of LINK - function getDONFee(bytes memory requestCBOR) external view returns (uint72); + function getDONFeeJuels(bytes memory requestCBOR) external view returns (uint72); /// @notice Determine the fee that will be paid to the Coordinator owner for operating the network /// @return fee - Cost in Juels (1e18) of LINK - function getOperationFee() external view returns (uint72); + function getOperationFeeJuels() external view returns (uint72); /// @notice Determine the fee that will be paid to the Router owner for operating the network /// @return fee - Cost in Juels (1e18) of LINK - function getAdminFee() external view returns (uint72); + function getAdminFeeJuels() external view returns (uint72); /// @notice Estimate the total cost that will be charged to a subscription to make a request: transmitter gas re-reimbursement, plus DON fee, plus Registry fee /// @param - subscriptionId An identifier of the billing account @@ -68,6 +68,6 @@ struct FunctionsBillingConfig { uint8 fallbackUsdPerUnitLinkDecimals; // ════════╝ Fallback LINK / USD conversion rate decimal places if the data feed is stale uint224 fallbackNativePerUnitLink; // ═══════════╗ Fallback NATIVE CURRENCY / LINK conversion rate if the data feed is stale uint32 requestTimeoutSeconds; // ════════════════╝ How many seconds it takes before we consider a request to be timed out - uint16 donFee; // ═══════════════════════════════╗ Additional flat fee (denominated in cents of USD, paid as LINK) that will be split between Node Operators. - uint16 operationFee; // ═════════════════════════╝ Additional flat fee (denominated in cents of USD, paid as LINK) that will be paid to the owner of the Coordinator contract. + uint16 donFeeCentsUsd; // ═══════════════════════════════╗ Additional flat fee (denominated in cents of USD, paid as LINK) that will be split between Node Operators. + uint16 operationFeeCentsUsd; // ═════════════════════════╝ Additional flat fee (denominated in cents of USD, paid as LINK) that will be paid to the owner of the Coordinator contract. } diff --git a/contracts/src/v0.8/functions/dev/v1_X/libraries/FunctionsResponse.sol b/contracts/src/v0.8/functions/dev/v1_X/libraries/FunctionsResponse.sol index 419d11dd569..073cce46e67 100644 --- a/contracts/src/v0.8/functions/dev/v1_X/libraries/FunctionsResponse.sol +++ b/contracts/src/v0.8/functions/dev/v1_X/libraries/FunctionsResponse.sol @@ -50,11 +50,11 @@ library FunctionsResponse { address client; // ════════════════════╗ The client contract that sent the request uint64 subscriptionId; // ║ Identifier of the billing subscription that will be charged for the request uint32 callbackGasLimit; // ═══════════╝ The amount of gas that the callback to the consuming contract will be given - uint72 adminFee; // ═══════════════════╗ Flat fee (in Juels of LINK) that will be paid to the Router Owner for operation of the network - uint72 donFee; // ║ Fee (in Juels of LINK) that will be split between Node Operators for servicing a request + uint72 adminFeeJuels; // ══════════════╗ Flat fee (in Juels of LINK) that will be paid to the Router Owner for operation of the network + uint72 donFeeJuels; // ║ Fee (in Juels of LINK) that will be split between Node Operators for servicing a request uint40 gasOverheadBeforeCallback; // ║ Represents the average gas execution cost before the fulfillment callback. uint40 gasOverheadAfterCallback; // ║ Represents the average gas execution cost after the fulfillment callback. uint32 timeoutTimestamp; // ═══════════╝ The timestamp at which a request will be eligible to be timed out - uint72 operationFee; // ═══════════════╸ Flat fee (in Juels of LINK) that will be paid to the Coordinator Owner for operation of the network + uint72 operationFeeJuels; // ══════════╸ Flat fee (in Juels of LINK) that will be paid to the Coordinator Owner for operation of the network } } diff --git a/contracts/src/v0.8/functions/tests/v1_X/FunctionsBilling.t.sol b/contracts/src/v0.8/functions/tests/v1_X/FunctionsBilling.t.sol index 90be81d0e86..590b07b5927 100644 --- a/contracts/src/v0.8/functions/tests/v1_X/FunctionsBilling.t.sol +++ b/contracts/src/v0.8/functions/tests/v1_X/FunctionsBilling.t.sol @@ -32,7 +32,7 @@ contract FunctionsBilling_GetConfig is FunctionsRouterSetup { assertEq(config.gasOverheadBeforeCallback, getCoordinatorConfig().gasOverheadBeforeCallback); assertEq(config.gasOverheadAfterCallback, getCoordinatorConfig().gasOverheadAfterCallback); assertEq(config.requestTimeoutSeconds, getCoordinatorConfig().requestTimeoutSeconds); - assertEq(config.donFee, getCoordinatorConfig().donFee); + assertEq(config.donFeeCentsUsd, getCoordinatorConfig().donFeeCentsUsd); assertEq(config.maxSupportedRequestDataVersion, getCoordinatorConfig().maxSupportedRequestDataVersion); assertEq(config.fulfillmentGasPriceOverEstimationBP, getCoordinatorConfig().fulfillmentGasPriceOverEstimationBP); assertEq(config.fallbackNativePerUnitLink, getCoordinatorConfig().fallbackNativePerUnitLink); @@ -52,8 +52,8 @@ contract FunctionsBilling_UpdateConfig is FunctionsRouterSetup { gasOverheadAfterCallback: getCoordinatorConfig().gasOverheadAfterCallback * 2, gasOverheadBeforeCallback: getCoordinatorConfig().gasOverheadBeforeCallback * 2, requestTimeoutSeconds: getCoordinatorConfig().requestTimeoutSeconds * 2, - donFee: getCoordinatorConfig().donFee * 2, - operationFee: getCoordinatorConfig().operationFee * 2, + donFeeCentsUsd: getCoordinatorConfig().donFeeCentsUsd * 2, + operationFeeCentsUsd: getCoordinatorConfig().operationFeeCentsUsd * 2, maxSupportedRequestDataVersion: getCoordinatorConfig().maxSupportedRequestDataVersion * 2, fulfillmentGasPriceOverEstimationBP: getCoordinatorConfig().fulfillmentGasPriceOverEstimationBP * 2, fallbackNativePerUnitLink: getCoordinatorConfig().fallbackNativePerUnitLink * 2, @@ -90,22 +90,25 @@ contract FunctionsBilling_UpdateConfig is FunctionsRouterSetup { assertEq(config.gasOverheadAfterCallback, configToSet.gasOverheadAfterCallback); assertEq(config.gasOverheadBeforeCallback, configToSet.gasOverheadBeforeCallback); assertEq(config.requestTimeoutSeconds, configToSet.requestTimeoutSeconds); - assertEq(config.donFee, configToSet.donFee); + assertEq(config.donFeeCentsUsd, configToSet.donFeeCentsUsd); + assertEq(config.operationFeeCentsUsd, configToSet.operationFeeCentsUsd); assertEq(config.maxSupportedRequestDataVersion, configToSet.maxSupportedRequestDataVersion); assertEq(config.fulfillmentGasPriceOverEstimationBP, configToSet.fulfillmentGasPriceOverEstimationBP); assertEq(config.fallbackNativePerUnitLink, configToSet.fallbackNativePerUnitLink); assertEq(config.minimumEstimateGasPriceWei, configToSet.minimumEstimateGasPriceWei); + assertEq(config.fallbackUsdPerUnitLink, configToSet.fallbackUsdPerUnitLink); + assertEq(config.fallbackUsdPerUnitLinkDecimals, configToSet.fallbackUsdPerUnitLinkDecimals); } } /// @notice #getDONFee -contract FunctionsBilling_GetDONFee is FunctionsRouterSetup { - function test_GetDONFee_Success() public { +contract FunctionsBilling_GetDONFeeJuels is FunctionsRouterSetup { + function test_GetDONFeeJuels_Success() public { // Send as stranger vm.stopPrank(); vm.startPrank(STRANGER_ADDRESS); - uint72 donFee = s_functionsCoordinator.getDONFee(new bytes(0)); + uint72 donFee = s_functionsCoordinator.getDONFeeJuels(new bytes(0)); uint72 expectedDonFee = uint72(((s_donFee * 10 ** (18 + LINK_USD_DECIMALS)) / uint256(LINK_USD_RATE)) / 100); assertEq(donFee, expectedDonFee); } @@ -113,12 +116,12 @@ contract FunctionsBilling_GetDONFee is FunctionsRouterSetup { /// @notice #getOperationFee contract FunctionsBilling_GetOperationFee is FunctionsRouterSetup { - function test_GetOperationFee_Success() public { + function test_GetOperationFeeJuels_Success() public { // Send as stranger vm.stopPrank(); vm.startPrank(STRANGER_ADDRESS); - uint72 operationFee = s_functionsCoordinator.getOperationFee(); + uint72 operationFee = s_functionsCoordinator.getOperationFeeJuels(); uint72 expectedOperationFee = uint72( ((s_operationFee * 10 ** (18 + LINK_USD_DECIMALS)) / uint256(LINK_USD_RATE)) / 100 ); @@ -127,13 +130,13 @@ contract FunctionsBilling_GetOperationFee is FunctionsRouterSetup { } /// @notice #getAdminFee -contract FunctionsBilling_GetAdminFee is FunctionsRouterSetup { - function test_GetAdminFee_Success() public { +contract FunctionsBilling_GetAdminFeeJuels is FunctionsRouterSetup { + function test_GetAdminFeeJuels_Success() public { // Send as stranger vm.stopPrank(); vm.startPrank(STRANGER_ADDRESS); - uint72 adminFee = s_functionsCoordinator.getAdminFee(); + uint72 adminFee = s_functionsCoordinator.getAdminFeeJuels(); assertEq(adminFee, s_adminFee); } } @@ -205,8 +208,8 @@ contract FunctionsBilling_EstimateCost is FunctionsSubscriptionSetup { ); uint96 expectedCostEstimate = 51110500000000000 + s_adminFee + - s_functionsCoordinator.getDONFee(requestData) + - s_functionsCoordinator.getOperationFee(); + s_functionsCoordinator.getDONFeeJuels(requestData) + + s_functionsCoordinator.getOperationFeeJuels(); assertEq(costEstimate, expectedCostEstimate); } @@ -233,8 +236,8 @@ contract FunctionsBilling_EstimateCost is FunctionsSubscriptionSetup { ); uint96 expectedCostEstimate = 255552500000000000 + s_adminFee + - s_functionsCoordinator.getDONFee(requestData) + - s_functionsCoordinator.getOperationFee(); + s_functionsCoordinator.getDONFeeJuels(requestData) + + s_functionsCoordinator.getOperationFeeJuels(); assertEq(costEstimate, expectedCostEstimate); } } @@ -323,9 +326,9 @@ contract FunctionsBilling__FulfillAndBill is FunctionsClientRequestSetup { juelsPerGas, 0, callbackCostJuels, - s_functionsCoordinator.getDONFee(new bytes(0)), + s_functionsCoordinator.getDONFeeJuels(new bytes(0)), s_adminFee, - s_functionsCoordinator.getOperationFee() + s_functionsCoordinator.getOperationFeeJuels() ); FunctionsResponse.FulfillResult resultCode = s_functionsCoordinator.fulfillAndBill_HARNESS( @@ -433,8 +436,8 @@ contract FunctionsBilling_OracleWithdraw is FunctionsMultipleFulfillmentsSetup { // Attempt to withdraw with no amount, which will withdraw the full balance s_functionsCoordinator.oracleWithdraw(NOP_TRANSMITTER_ADDRESS_1, 0); - uint96 totalOperationFees = s_functionsCoordinator.getOperationFee() * s_requestsFulfilled; - uint96 totalDonFees = s_functionsCoordinator.getDONFee(new bytes(0)) * s_requestsFulfilled; + uint96 totalOperationFees = s_functionsCoordinator.getOperationFeeJuels() * s_requestsFulfilled; + uint96 totalDonFees = s_functionsCoordinator.getDONFeeJuels(new bytes(0)) * s_requestsFulfilled; uint96 donFeeShare = totalDonFees / uint8(s_transmitters.length); uint96 expectedBalancePerFulfillment = ((s_fulfillmentCoordinatorBalance - totalOperationFees - totalDonFees) / s_requestsFulfilled); @@ -459,7 +462,7 @@ contract FunctionsBilling_OracleWithdraw is FunctionsMultipleFulfillmentsSetup { s_functionsCoordinator.oracleWithdraw(coordinatorOwner, 0); // 4 report transmissions have been made - uint96 totalOperationFees = s_functionsCoordinator.getOperationFee() * s_requestsFulfilled; + uint96 totalOperationFees = s_functionsCoordinator.getOperationFeeJuels() * s_requestsFulfilled; uint256 coordinatorOwnerBalanceAfter = s_linkToken.balanceOf(coordinatorOwner); assertEq(coordinatorOwnerBalanceBefore + totalOperationFees, coordinatorOwnerBalanceAfter); @@ -487,8 +490,8 @@ contract FunctionsBilling_OracleWithdrawAll is FunctionsMultipleFulfillmentsSetu s_functionsCoordinator.oracleWithdrawAll(); - uint96 totalOperationFees = s_functionsCoordinator.getOperationFee() * s_requestsFulfilled; - uint96 totalDonFees = s_functionsCoordinator.getDONFee(new bytes(0)) * s_requestsFulfilled; + uint96 totalOperationFees = s_functionsCoordinator.getOperationFeeJuels() * s_requestsFulfilled; + uint96 totalDonFees = s_functionsCoordinator.getDONFeeJuels(new bytes(0)) * s_requestsFulfilled; uint96 donFeeShare = totalDonFees / uint8(s_transmitters.length); uint96 expectedBalancePerFulfillment = ((s_fulfillmentCoordinatorBalance - totalOperationFees - totalDonFees) / s_requestsFulfilled); diff --git a/contracts/src/v0.8/functions/tests/v1_X/FunctionsCoordinator.t.sol b/contracts/src/v0.8/functions/tests/v1_X/FunctionsCoordinator.t.sol index f532a5a12ef..8aff0a6d869 100644 --- a/contracts/src/v0.8/functions/tests/v1_X/FunctionsCoordinator.t.sol +++ b/contracts/src/v0.8/functions/tests/v1_X/FunctionsCoordinator.t.sol @@ -191,7 +191,7 @@ contract FunctionsCoordinator_StartRequest is FunctionsSubscriptionSetup { FunctionsResponse.CommitmentWithOperationFee memory expectedComittment = FunctionsResponse .CommitmentWithOperationFee({ - adminFee: s_adminFee, + adminFeeJuels: s_adminFee, coordinator: address(s_functionsCoordinator), client: address(s_functionsClient), subscriptionId: s_subscriptionId, @@ -199,8 +199,8 @@ contract FunctionsCoordinator_StartRequest is FunctionsSubscriptionSetup { estimatedTotalCostJuels: costEstimate, timeoutTimestamp: timeoutTimestamp, requestId: expectedRequestId, - donFee: s_functionsCoordinator.getDONFee(_requestData), - operationFee: s_functionsCoordinator.getOperationFee(), + donFeeJuels: s_functionsCoordinator.getDONFeeJuels(_requestData), + operationFeeJuels: s_functionsCoordinator.getOperationFeeJuels(), gasOverheadBeforeCallback: getCoordinatorConfig().gasOverheadBeforeCallback, gasOverheadAfterCallback: getCoordinatorConfig().gasOverheadAfterCallback }); diff --git a/contracts/src/v0.8/functions/tests/v1_X/FunctionsRouter.t.sol b/contracts/src/v0.8/functions/tests/v1_X/FunctionsRouter.t.sol index 3dc7378ffed..4bb9fb47ce7 100644 --- a/contracts/src/v0.8/functions/tests/v1_X/FunctionsRouter.t.sol +++ b/contracts/src/v0.8/functions/tests/v1_X/FunctionsRouter.t.sol @@ -1087,7 +1087,7 @@ contract FunctionsRouter_Fulfill is FunctionsClientRequestSetup { }), requestId: requestId, commitment: FunctionsResponse.Commitment({ - adminFee: _commitment.adminFee, + adminFee: _commitment.adminFeeJuels, coordinator: _commitment.coordinator, client: _commitment.client, subscriptionId: _commitment.subscriptionId, @@ -1095,7 +1095,7 @@ contract FunctionsRouter_Fulfill is FunctionsClientRequestSetup { estimatedTotalCostJuels: _commitment.estimatedTotalCostJuels, timeoutTimestamp: _commitment.timeoutTimestamp, requestId: _commitment.requestId, - donFee: _commitment.donFee, + donFee: _commitment.donFeeJuels, gasOverheadBeforeCallback: _commitment.gasOverheadBeforeCallback, gasOverheadAfterCallback: _commitment.gasOverheadAfterCallback }), diff --git a/contracts/src/v0.8/functions/tests/v1_X/Setup.t.sol b/contracts/src/v0.8/functions/tests/v1_X/Setup.t.sol index 031237040b1..6a7f0df38b9 100644 --- a/contracts/src/v0.8/functions/tests/v1_X/Setup.t.sol +++ b/contracts/src/v0.8/functions/tests/v1_X/Setup.t.sol @@ -86,8 +86,8 @@ contract FunctionsRouterSetup is BaseTest { gasOverheadAfterCallback: 93_942, gasOverheadBeforeCallback: 105_000, requestTimeoutSeconds: 60 * 5, // 5 minutes - donFee: s_donFee, - operationFee: s_operationFee, + donFeeCentsUsd: s_donFee, + operationFeeCentsUsd: s_operationFee, maxSupportedRequestDataVersion: 1, fulfillmentGasPriceOverEstimationBP: 5000, fallbackNativePerUnitLink: 5000000000000000, @@ -305,9 +305,9 @@ contract FunctionsClientRequestSetup is FunctionsSubscriptionSetup { bytes memory emptyData = new bytes(0); return gasOverheadJuels + - s_functionsCoordinator.getDONFee(emptyData) + + s_functionsCoordinator.getDONFeeJuels(emptyData) + s_adminFee + - s_functionsCoordinator.getOperationFee() + + s_functionsCoordinator.getOperationFeeJuels() + callbackGasCostJuels; } @@ -321,9 +321,9 @@ contract FunctionsClientRequestSetup is FunctionsSubscriptionSetup { bytes memory emptyData = new bytes(0); return gasOverheadJuels + - s_functionsCoordinator.getDONFee(emptyData) + + s_functionsCoordinator.getDONFeeJuels(emptyData) + s_adminFee + - s_functionsCoordinator.getOperationFee() + + s_functionsCoordinator.getOperationFeeJuels() + callbackGasCostJuels; } @@ -376,7 +376,7 @@ contract FunctionsClientRequestSetup is FunctionsSubscriptionSetup { }), requestId: requestId, commitment: FunctionsResponse.Commitment({ - adminFee: commitment.adminFee, + adminFee: commitment.adminFeeJuels, coordinator: commitment.coordinator, client: commitment.client, subscriptionId: commitment.subscriptionId, @@ -384,7 +384,7 @@ contract FunctionsClientRequestSetup is FunctionsSubscriptionSetup { estimatedTotalCostJuels: commitment.estimatedTotalCostJuels, timeoutTimestamp: commitment.timeoutTimestamp, requestId: commitment.requestId, - donFee: commitment.donFee, + donFee: commitment.donFeeJuels, gasOverheadBeforeCallback: commitment.gasOverheadBeforeCallback, gasOverheadAfterCallback: commitment.gasOverheadAfterCallback }), diff --git a/contracts/src/v0.8/functions/v1_1_0/FunctionsBilling.sol b/contracts/src/v0.8/functions/v1_1_0/FunctionsBilling.sol index 845d9a585aa..ff345003741 100644 --- a/contracts/src/v0.8/functions/v1_1_0/FunctionsBilling.sol +++ b/contracts/src/v0.8/functions/v1_1_0/FunctionsBilling.sol @@ -298,7 +298,7 @@ abstract contract FunctionsBilling is Routable, IFunctionsBilling { ) { delete s_requestCommitments[requestId]; // Reimburse the transmitter for the fulfillment gas cost - s_withdrawableTokens[msg.sender] += gasOverheadJuels + callbackCostJuels; + s_withdrawableTokens[msg.sender] = gasOverheadJuels + callbackCostJuels; // Put donFee into the pool of fees, to be split later // Saves on storage writes that would otherwise be charged to the user s_feePool += commitment.donFee; diff --git a/contracts/test/v0.8/functions/v1/utils.ts b/contracts/test/v0.8/functions/v1/utils.ts index 053e4c2e9a9..dd3853c2d9d 100644 --- a/contracts/test/v0.8/functions/v1/utils.ts +++ b/contracts/test/v0.8/functions/v1/utils.ts @@ -95,12 +95,12 @@ export type CoordinatorConfig = { gasOverheadBeforeCallback: number gasOverheadAfterCallback: number requestTimeoutSeconds: number - donFee: number + donFeeCentsUsd: number maxSupportedRequestDataVersion: number fulfillmentGasPriceOverEstimationBP: number fallbackNativePerUnitLink: BigNumber minimumEstimateGasPriceWei: number - operationFee: number + operationFeeCentsUsd: number fallbackUsdPerUnitLink: number fallbackUsdPerUnitLinkDecimals: number } @@ -110,12 +110,12 @@ export const coordinatorConfig: CoordinatorConfig = { gasOverheadBeforeCallback: 44_615, gasOverheadAfterCallback: 44_615, requestTimeoutSeconds: 300, - donFee: 0, + donFeeCentsUsd: 0, maxSupportedRequestDataVersion: 1, fulfillmentGasPriceOverEstimationBP: 0, fallbackNativePerUnitLink: BigNumber.from(fallbackNativePerUnitLink), minimumEstimateGasPriceWei: 1000000000, - operationFee: 0, + operationFeeCentsUsd: 0, fallbackUsdPerUnitLink: 1500000000, fallbackUsdPerUnitLinkDecimals: 8, } diff --git a/core/gethwrappers/functions/generated/functions_coordinator/functions_coordinator.go b/core/gethwrappers/functions/generated/functions_coordinator/functions_coordinator.go index bce5ae0ba8f..10536316813 100644 --- a/core/gethwrappers/functions/generated/functions_coordinator/functions_coordinator.go +++ b/core/gethwrappers/functions/generated/functions_coordinator/functions_coordinator.go @@ -41,8 +41,8 @@ type FunctionsBillingConfig struct { FallbackUsdPerUnitLinkDecimals uint8 FallbackNativePerUnitLink *big.Int RequestTimeoutSeconds uint32 - DonFee uint16 - OperationFee uint16 + DonFeeCentsUsd uint16 + OperationFeeCentsUsd uint16 } type FunctionsResponseCommitment struct { @@ -66,12 +66,12 @@ type FunctionsResponseCommitmentWithOperationFee struct { Client common.Address SubscriptionId uint64 CallbackGasLimit uint32 - AdminFee *big.Int - DonFee *big.Int + AdminFeeJuels *big.Int + DonFeeJuels *big.Int GasOverheadBeforeCallback *big.Int GasOverheadAfterCallback *big.Int TimeoutTimestamp uint32 - OperationFee *big.Int + OperationFeeJuels *big.Int } type FunctionsResponseRequestMeta struct { @@ -89,8 +89,8 @@ type FunctionsResponseRequestMeta struct { } var FunctionsCoordinatorMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"fulfillmentGasPriceOverEstimationBP\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"feedStalenessSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasOverheadBeforeCallback\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasOverheadAfterCallback\",\"type\":\"uint32\"},{\"internalType\":\"uint40\",\"name\":\"minimumEstimateGasPriceWei\",\"type\":\"uint40\"},{\"internalType\":\"uint16\",\"name\":\"maxSupportedRequestDataVersion\",\"type\":\"uint16\"},{\"internalType\":\"uint64\",\"name\":\"fallbackUsdPerUnitLink\",\"type\":\"uint64\"},{\"internalType\":\"uint8\",\"name\":\"fallbackUsdPerUnitLinkDecimals\",\"type\":\"uint8\"},{\"internalType\":\"uint224\",\"name\":\"fallbackNativePerUnitLink\",\"type\":\"uint224\"},{\"internalType\":\"uint32\",\"name\":\"requestTimeoutSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"donFee\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"operationFee\",\"type\":\"uint16\"}],\"internalType\":\"structFunctionsBillingConfig\",\"name\":\"config\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"linkToNativeFeed\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"linkToUsdFeed\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"EmptyPublicKey\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InconsistentReportData\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientBalance\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidCalldata\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"message\",\"type\":\"string\"}],\"name\":\"InvalidConfig\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"int256\",\"name\":\"linkWei\",\"type\":\"int256\"}],\"name\":\"InvalidLinkWeiPrice\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidSubscription\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"int256\",\"name\":\"usdLink\",\"type\":\"int256\"}],\"name\":\"InvalidUsdLinkPrice\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"MustBeSubOwner\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NoTransmittersSet\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByRouter\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByRouterOwner\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PaymentTooLarge\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"message\",\"type\":\"string\"}],\"name\":\"ReportInvalid\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RouterMustBeSet\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnauthorizedPublicKeyChange\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnauthorizedSender\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnsupportedRequestDataVersion\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"requestId\",\"type\":\"bytes32\"}],\"name\":\"CommitmentDeleted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"previousConfigBlockNumber\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"configCount\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"signers\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"transmitters\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"onchainConfig\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"offchainConfigVersion\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"}],\"name\":\"ConfigSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"fulfillmentGasPriceOverEstimationBP\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"feedStalenessSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasOverheadBeforeCallback\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasOverheadAfterCallback\",\"type\":\"uint32\"},{\"internalType\":\"uint40\",\"name\":\"minimumEstimateGasPriceWei\",\"type\":\"uint40\"},{\"internalType\":\"uint16\",\"name\":\"maxSupportedRequestDataVersion\",\"type\":\"uint16\"},{\"internalType\":\"uint64\",\"name\":\"fallbackUsdPerUnitLink\",\"type\":\"uint64\"},{\"internalType\":\"uint8\",\"name\":\"fallbackUsdPerUnitLinkDecimals\",\"type\":\"uint8\"},{\"internalType\":\"uint224\",\"name\":\"fallbackNativePerUnitLink\",\"type\":\"uint224\"},{\"internalType\":\"uint32\",\"name\":\"requestTimeoutSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"donFee\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"operationFee\",\"type\":\"uint16\"}],\"indexed\":false,\"internalType\":\"structFunctionsBillingConfig\",\"name\":\"config\",\"type\":\"tuple\"}],\"name\":\"ConfigUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"requestId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"requestingContract\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"requestInitiator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"subscriptionId\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"subscriptionOwner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"dataVersion\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"flags\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"callbackGasLimit\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"requestId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"coordinator\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"estimatedTotalCostJuels\",\"type\":\"uint96\"},{\"internalType\":\"address\",\"name\":\"client\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"subscriptionId\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint72\",\"name\":\"adminFee\",\"type\":\"uint72\"},{\"internalType\":\"uint72\",\"name\":\"donFee\",\"type\":\"uint72\"},{\"internalType\":\"uint40\",\"name\":\"gasOverheadBeforeCallback\",\"type\":\"uint40\"},{\"internalType\":\"uint40\",\"name\":\"gasOverheadAfterCallback\",\"type\":\"uint40\"},{\"internalType\":\"uint32\",\"name\":\"timeoutTimestamp\",\"type\":\"uint32\"},{\"internalType\":\"uint72\",\"name\":\"operationFee\",\"type\":\"uint72\"}],\"indexed\":false,\"internalType\":\"structFunctionsResponse.CommitmentWithOperationFee\",\"name\":\"commitment\",\"type\":\"tuple\"}],\"name\":\"OracleRequest\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"requestId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"transmitter\",\"type\":\"address\"}],\"name\":\"OracleResponse\",\"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\":\"bytes32\",\"name\":\"requestId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"juelsPerGas\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"l1FeeShareWei\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"callbackCostJuels\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint72\",\"name\":\"donFeeJuels\",\"type\":\"uint72\"},{\"indexed\":false,\"internalType\":\"uint72\",\"name\":\"adminFeeJuels\",\"type\":\"uint72\"},{\"indexed\":false,\"internalType\":\"uint72\",\"name\":\"operationFeeJuels\",\"type\":\"uint72\"}],\"name\":\"RequestBilled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"epoch\",\"type\":\"uint32\"}],\"name\":\"Transmitted\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"requestId\",\"type\":\"bytes32\"}],\"name\":\"deleteCommitment\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"subscriptionId\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"gasPriceWei\",\"type\":\"uint256\"}],\"name\":\"estimateCost\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAdminFee\",\"outputs\":[{\"internalType\":\"uint72\",\"name\":\"\",\"type\":\"uint72\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getConfig\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"fulfillmentGasPriceOverEstimationBP\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"feedStalenessSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasOverheadBeforeCallback\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasOverheadAfterCallback\",\"type\":\"uint32\"},{\"internalType\":\"uint40\",\"name\":\"minimumEstimateGasPriceWei\",\"type\":\"uint40\"},{\"internalType\":\"uint16\",\"name\":\"maxSupportedRequestDataVersion\",\"type\":\"uint16\"},{\"internalType\":\"uint64\",\"name\":\"fallbackUsdPerUnitLink\",\"type\":\"uint64\"},{\"internalType\":\"uint8\",\"name\":\"fallbackUsdPerUnitLinkDecimals\",\"type\":\"uint8\"},{\"internalType\":\"uint224\",\"name\":\"fallbackNativePerUnitLink\",\"type\":\"uint224\"},{\"internalType\":\"uint32\",\"name\":\"requestTimeoutSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"donFee\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"operationFee\",\"type\":\"uint16\"}],\"internalType\":\"structFunctionsBillingConfig\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"getDONFee\",\"outputs\":[{\"internalType\":\"uint72\",\"name\":\"\",\"type\":\"uint72\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getDONPublicKey\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getOperationFee\",\"outputs\":[{\"internalType\":\"uint72\",\"name\":\"\",\"type\":\"uint72\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getThresholdPublicKey\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getUsdPerUnitLink\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getWeiPerUnitLink\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestConfigDetails\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"configCount\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blockNumber\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestConfigDigestAndEpoch\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"scanLogs\",\"type\":\"bool\"},{\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"epoch\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"oracleWithdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"oracleWithdrawAll\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_signers\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"_transmitters\",\"type\":\"address[]\"},{\"internalType\":\"uint8\",\"name\":\"_f\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"_onchainConfig\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"_offchainConfigVersion\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"_offchainConfig\",\"type\":\"bytes\"}],\"name\":\"setConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"donPublicKey\",\"type\":\"bytes\"}],\"name\":\"setDONPublicKey\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"thresholdPublicKey\",\"type\":\"bytes\"}],\"name\":\"setThresholdPublicKey\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"flags\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"requestingContract\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"availableBalance\",\"type\":\"uint96\"},{\"internalType\":\"uint72\",\"name\":\"adminFee\",\"type\":\"uint72\"},{\"internalType\":\"uint64\",\"name\":\"subscriptionId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"initiatedRequests\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"dataVersion\",\"type\":\"uint16\"},{\"internalType\":\"uint64\",\"name\":\"completedRequests\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"subscriptionOwner\",\"type\":\"address\"}],\"internalType\":\"structFunctionsResponse.RequestMeta\",\"name\":\"request\",\"type\":\"tuple\"}],\"name\":\"startRequest\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"requestId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"coordinator\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"estimatedTotalCostJuels\",\"type\":\"uint96\"},{\"internalType\":\"address\",\"name\":\"client\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"subscriptionId\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint72\",\"name\":\"adminFee\",\"type\":\"uint72\"},{\"internalType\":\"uint72\",\"name\":\"donFee\",\"type\":\"uint72\"},{\"internalType\":\"uint40\",\"name\":\"gasOverheadBeforeCallback\",\"type\":\"uint40\"},{\"internalType\":\"uint40\",\"name\":\"gasOverheadAfterCallback\",\"type\":\"uint40\"},{\"internalType\":\"uint32\",\"name\":\"timeoutTimestamp\",\"type\":\"uint32\"}],\"internalType\":\"structFunctionsResponse.Commitment\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[3]\",\"name\":\"reportContext\",\"type\":\"bytes32[3]\"},{\"internalType\":\"bytes\",\"name\":\"report\",\"type\":\"bytes\"},{\"internalType\":\"bytes32[]\",\"name\":\"rs\",\"type\":\"bytes32[]\"},{\"internalType\":\"bytes32[]\",\"name\":\"ss\",\"type\":\"bytes32[]\"},{\"internalType\":\"bytes32\",\"name\":\"rawVs\",\"type\":\"bytes32\"}],\"name\":\"transmit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"transmitters\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"typeAndVersion\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"fulfillmentGasPriceOverEstimationBP\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"feedStalenessSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasOverheadBeforeCallback\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasOverheadAfterCallback\",\"type\":\"uint32\"},{\"internalType\":\"uint40\",\"name\":\"minimumEstimateGasPriceWei\",\"type\":\"uint40\"},{\"internalType\":\"uint16\",\"name\":\"maxSupportedRequestDataVersion\",\"type\":\"uint16\"},{\"internalType\":\"uint64\",\"name\":\"fallbackUsdPerUnitLink\",\"type\":\"uint64\"},{\"internalType\":\"uint8\",\"name\":\"fallbackUsdPerUnitLinkDecimals\",\"type\":\"uint8\"},{\"internalType\":\"uint224\",\"name\":\"fallbackNativePerUnitLink\",\"type\":\"uint224\"},{\"internalType\":\"uint32\",\"name\":\"requestTimeoutSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"donFee\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"operationFee\",\"type\":\"uint16\"}],\"internalType\":\"structFunctionsBillingConfig\",\"name\":\"config\",\"type\":\"tuple\"}],\"name\":\"updateConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x60a06040523480156200001157600080fd5b506040516200619f3803806200619f8339810160408190526200003491620004db565b83838383833380600081620000905760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000c357620000c3816200014e565b5050506001600160a01b038116620000ee57604051632530e88560e11b815260040160405180910390fd5b6001600160a01b03908116608052600c80546001600160601b03166c0100000000000000000000000085841602179055600d80546001600160a01b0319169183169190911790556200014083620001f9565b505050505050505062000742565b336001600160a01b03821603620001a85760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000087565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b620002036200039e565b80516008805460208401516040808601516060870151608088015160a089015160c08a015160e08b015160ff16600160f81b026001600160f81b036001600160401b03909216600160b81b02919091166001600160b81b0361ffff938416600160a81b0261ffff60a81b1964ffffffffff909616600160801b029590951666ffffffffffffff60801b1963ffffffff9788166c010000000000000000000000000263ffffffff60601b19998916680100000000000000000299909916600160401b600160801b03199b8916640100000000026001600160401b0319909d169e89169e909e179b909b17999099169b909b1795909517979097169590951717969096161792909217909255610100840151610120850151909316600160e01b026001600160e01b0390931692909217600955610140830151600a80546101608601518416620100000263ffffffff19919091169290931691909117919091179055517f2e2c8535dcc25459d519f2300c114d2d2128bf6399722d04eca078461a3bf33a906200039390839062000639565b60405180910390a150565b620003a8620003aa565b565b6000546001600160a01b03163314620003a85760405162461bcd60e51b815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000604482015260640162000087565b80516001600160a01b03811681146200041e57600080fd5b919050565b60405161018081016001600160401b03811182821017156200045557634e487b7160e01b600052604160045260246000fd5b60405290565b805163ffffffff811681146200041e57600080fd5b805164ffffffffff811681146200041e57600080fd5b805161ffff811681146200041e57600080fd5b80516001600160401b03811681146200041e57600080fd5b805160ff811681146200041e57600080fd5b80516001600160e01b03811681146200041e57600080fd5b6000806000808486036101e0811215620004f457600080fd5b620004ff8662000406565b945061018080601f19830112156200051657600080fd5b6200052062000423565b915062000530602088016200045b565b825262000540604088016200045b565b602083015262000553606088016200045b565b604083015262000566608088016200045b565b60608301526200057960a0880162000470565b60808301526200058c60c0880162000486565b60a08301526200059f60e0880162000499565b60c0830152610100620005b4818901620004b1565b60e0840152610120620005c9818a01620004c3565b828501526101409150620005df828a016200045b565b90840152610160620005f389820162000486565b8285015262000604838a0162000486565b90840152509093506200061d90506101a0860162000406565b91506200062e6101c0860162000406565b905092959194509250565b815163ffffffff1681526101808101602083015162000660602084018263ffffffff169052565b50604083015162000679604084018263ffffffff169052565b50606083015162000692606084018263ffffffff169052565b506080830151620006ac608084018264ffffffffff169052565b5060a0830151620006c360a084018261ffff169052565b5060c0830151620006df60c08401826001600160401b03169052565b5060e0830151620006f560e084018260ff169052565b50610100838101516001600160e01b0316908301526101208084015163ffffffff16908301526101408084015161ffff908116918401919091526101609384015116929091019190915290565b608051615a1762000788600039600081816106670152818161083201528181610d1301528181610fa7015281816110bd01528181611bc7015261397f0152615a176000f3fe608060405234801561001057600080fd5b50600436106101a35760003560e01c806385b214cf116100ee578063c3f909d411610097578063e3d0e71211610071578063e3d0e712146105ca578063e4ddcea6146105dd578063ec2c65c1146105f3578063f2fde38b146105fb57600080fd5b8063c3f909d4146103c4578063d227d24514610592578063d328a91e146105c257600080fd5b8063afcb95d7116100c8578063afcb95d71461037e578063b1dc65a41461039e578063ba9c924d146103b157600080fd5b806385b214cf146103235780638da5cb5b14610336578063a631571e1461035e57600080fd5b806379ba509711610150578063814118341161012a578063814118341461029957806381f1b938146102ae57806381ff7048146102b657600080fd5b806379ba5097146102765780637d4807871461027e5780637f15e1661461028657600080fd5b806359b5b7ac1161018157806359b5b7ac1461023157806366316d8d146102445780637212762f1461025757600080fd5b8063083a5466146101a8578063181f5a77146101bd5780632a905ccc1461020f575b600080fd5b6101bb6101b636600461402f565b61060e565b005b6101f96040518060400160405280601c81526020017f46756e6374696f6e7320436f6f7264696e61746f722076322e302e300000000081525081565b60405161020691906140df565b60405180910390f35b610217610663565b60405168ffffffffffffffffff9091168152602001610206565b61021761023f36600461424c565b6106f9565b6101bb6102523660046142d3565b610736565b61025f6108ef565b6040805192835260ff909116602083015201610206565b6101bb610b02565b6101bb610bff565b6101bb61029436600461402f565b610dff565b6102a1610e4f565b604051610206919061435d565b6101f9610ebe565b61030060015460025463ffffffff74010000000000000000000000000000000000000000830481169378010000000000000000000000000000000000000000000000009093041691565b6040805163ffffffff948516815293909216602084015290820152606001610206565b6101bb610331366004614370565b610f8f565b60005460405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610206565b61037161036c366004614389565b61104c565b60405161020691906144ea565b604080516001815260006020820181905291810191909152606001610206565b6101bb6103ac36600461453e565b6112e1565b6101bb6103bf3660046146a9565b6118f8565b6105856040805161018081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e0810182905261010081018290526101208101829052610140810182905261016081019190915250604080516101808101825260085463ffffffff80821683526401000000008204811660208401526801000000000000000082048116938301939093526c01000000000000000000000000810483166060830152700100000000000000000000000000000000810464ffffffffff1660808301527501000000000000000000000000000000000000000000810461ffff90811660a084015277010000000000000000000000000000000000000000000000820467ffffffffffffffff1660c08401527f010000000000000000000000000000000000000000000000000000000000000090910460ff1660e08301526009547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff81166101008401527c01000000000000000000000000000000000000000000000000000000009004909216610120820152600a5480831661014083015262010000900490911661016082015290565b6040516102069190614795565b6105a56105a03660046148b2565b611bc3565b6040516bffffffffffffffffffffffff9091168152602001610206565b6101f9611d31565b6101bb6105d83660046149ba565b611d88565b6105e5612904565b604051908152602001610206565b610217612a48565b6101bb610609366004614a87565b612a68565b610616612a7c565b6000819003610651576040517f4f42be3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600f61065e828483614b37565b505050565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16632a905ccc6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f49190614c74565b905090565b600a54600090610730906064906107139061ffff16612aff565b61071d9190614cef565b6bffffffffffffffffffffffff16612b4c565b92915050565b61073e612beb565b806bffffffffffffffffffffffff166000036107785750336000908152600b60205260409020546bffffffffffffffffffffffff166107d2565b336000908152600b60205260409020546bffffffffffffffffffffffff808316911610156107d2576040517ff4d678b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336000908152600b6020526040812080548392906107ff9084906bffffffffffffffffffffffff16614d1a565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055506108547f000000000000000000000000000000000000000000000000000000000000000090565b6040517f66316d8d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301526bffffffffffffffffffffffff8416602483015291909116906366316d8d90604401600060405180830381600087803b1580156108d357600080fd5b505af11580156108e7573d6000803e3d6000fd5b505050505050565b600080600080600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015610962573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109869190614d60565b5093505092505080426109999190614db0565b600854640100000000900463ffffffff161080156109c65750600854640100000000900463ffffffff1615155b15610a2357505060085477010000000000000000000000000000000000000000000000810467ffffffffffffffff16937f010000000000000000000000000000000000000000000000000000000000000090910460ff1692509050565b60008213610a65576040517f56b22ab8000000000000000000000000000000000000000000000000000000008152600481018390526024015b60405180910390fd5b600d54604080517f313ce5670000000000000000000000000000000000000000000000000000000081529051849273ffffffffffffffffffffffffffffffffffffffff169163313ce5679160048083019260209291908290030181865afa158015610ad4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610af89190614dc3565b9350935050509091565b60015473ffffffffffffffffffffffffffffffffffffffff163314610b83576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e6572000000000000000000006044820152606401610a5c565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b610c07612d97565b610c0f612beb565b6000610c19610e4f565b905060005b8151811015610dfb576000600b6000848481518110610c3f57610c3f614de0565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff168252810191909152604001600020546bffffffffffffffffffffffff1690508015610dea576000600b6000858581518110610c9e57610c9e614de0565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550610d357f000000000000000000000000000000000000000000000000000000000000000090565b73ffffffffffffffffffffffffffffffffffffffff166366316d8d848481518110610d6257610d62614de0565b6020026020010151836040518363ffffffff1660e01b8152600401610db792919073ffffffffffffffffffffffffffffffffffffffff9290921682526bffffffffffffffffffffffff16602082015260400190565b600060405180830381600087803b158015610dd157600080fd5b505af1158015610de5573d6000803e3d6000fd5b505050505b50610df481614e0f565b9050610c1e565b5050565b610e07612a7c565b6000819003610e42576040517f4f42be3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600e61065e828483614b37565b60606006805480602002602001604051908101604052809291908181526020018280548015610eb457602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311610e89575b5050505050905090565b6060600f8054610ecd90614aa4565b9050600003610f08576040517f4f42be3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600f8054610f1590614aa4565b80601f0160208091040260200160405190810160405280929190818152602001828054610f4190614aa4565b8015610eb45780601f10610f6357610100808354040283529160200191610eb4565b820191906000526020600020905b815481529060010190602001808311610f7157509395945050505050565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610ffe576040517fc41a5b0900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008181526007602052604080822091909155517f8a4b97add3359bd6bcf5e82874363670eb5ad0f7615abddbd0ed0a3a98f0f416906110419083815260200190565b60405180910390a150565b6040805161016081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810182905261012081018290526101408101919091523373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614611114576040517fc41a5b0900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061112761112284614e52565b612d9f565b90506111396060840160408501614a87565b815173ffffffffffffffffffffffffffffffffffffffff91909116907f718684b6c135c1277575a7b5c7365bc9587d5ebfd899230d5fa11360f6143bfb3261118760c0880160a08901614f3f565b61119961016089016101408a01614a87565b6111a38980614f5c565b6111b56101208c016101008d01614fc1565b60208c01356111cb6101008e0160e08f01614fdc565b8b6040516111e19998979695949392919061512d565b60405180910390a360405180610160016040528082600001518152602001826020015173ffffffffffffffffffffffffffffffffffffffff16815260200182604001516bffffffffffffffffffffffff168152602001826060015173ffffffffffffffffffffffffffffffffffffffff168152602001826080015167ffffffffffffffff1681526020018260a0015163ffffffff1681526020018260c0015168ffffffffffffffffff1681526020018260e0015168ffffffffffffffffff16815260200182610100015164ffffffffff16815260200182610120015164ffffffffff16815260200182610140015163ffffffff168152509150505b919050565b6000806112ee8989613163565b9150915081156112ff5750506118ee565b604080518b3580825262ffffff6020808f0135600881901c9290921690840152909290917fb04e63db38c49950639fa09d29872f21f5d49d614f3a969d8adf3d4b52e41a62910160405180910390a161135c8b8b8b8b8b8b6132ec565b60035460009060029061137a9060ff808216916101009004166151e3565b61138491906151fc565b61138f9060016151e3565b60ff1690508881146113fd576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f77726f6e67206e756d626572206f66207369676e6174757265730000000000006044820152606401610a5c565b88871461148c576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f7265706f727420727320616e64207373206d757374206265206f66206571756160448201527f6c206c656e6774680000000000000000000000000000000000000000000000006064820152608401610a5c565b3360009081526004602090815260408083208151808301909252805460ff808216845292939192918401916101009091041660028111156114cf576114cf61521e565b60028111156114e0576114e061521e565b90525090506002816020015160028111156114fd576114fd61521e565b1415801561154657506006816000015160ff168154811061152057611520614de0565b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff163314155b156115ad576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f756e617574686f72697a6564207472616e736d697474657200000000000000006044820152606401610a5c565b505050506115b9613fce565b60008a8a6040516115cb92919061524d565b6040519081900381206115e2918e9060200161525d565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181528282528051602091820120838301909252600080845290830152915060005b898110156118de57600060018489846020811061164b5761164b614de0565b61165891901a601b6151e3565b8e8e8681811061166a5761166a614de0565b905060200201358d8d8781811061168357611683614de0565b90506020020135604051600081526020016040526040516116c0949392919093845260ff9290921660208401526040830152606082015260800190565b6020604051602081039080840390855afa1580156116e2573d6000803e3d6000fd5b5050604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081015173ffffffffffffffffffffffffffffffffffffffff811660009081526004602090815290849020838501909452835460ff808216855292965092945084019161010090041660028111156117625761176261521e565b60028111156117735761177361521e565b90525092506001836020015160028111156117905761179061521e565b146117f7576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f61646472657373206e6f7420617574686f72697a656420746f207369676e00006044820152606401610a5c565b8251600090869060ff16601f811061181157611811614de0565b602002015173ffffffffffffffffffffffffffffffffffffffff1614611893576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f6e6f6e2d756e69717565207369676e61747572650000000000000000000000006044820152606401610a5c565b8085846000015160ff16601f81106118ad576118ad614de0565b73ffffffffffffffffffffffffffffffffffffffff9092166020929092020152506118d781614e0f565b905061162c565b5050506118ea826133a3565b5050505b5050505050505050565b611900612d97565b80516008805460208401516040808601516060870151608088015160a089015160c08a015160e08b015160ff167f0100000000000000000000000000000000000000000000000000000000000000027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff67ffffffffffffffff90921677010000000000000000000000000000000000000000000000029190911676ffffffffffffffffffffffffffffffffffffffffffffff61ffff9384167501000000000000000000000000000000000000000000027fffffffffffffffffff0000ffffffffffffffffffffffffffffffffffffffffff64ffffffffff90961670010000000000000000000000000000000002959095167fffffffffffffffffff00000000000000ffffffffffffffffffffffffffffffff63ffffffff9788166c01000000000000000000000000027fffffffffffffffffffffffffffffffff00000000ffffffffffffffffffffffff9989166801000000000000000002999099167fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff9b8916640100000000027fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000909d169e89169e909e179b909b17999099169b909b17959095179790971695909517179690961617929092179092556101008401516101208501519093167c0100000000000000000000000000000000000000000000000000000000027bffffffffffffffffffffffffffffffffffffffffffffffffffffffff90931692909217600955610140830151600a8054610160860151841662010000027fffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000919091169290931691909117919091179055517f2e2c8535dcc25459d519f2300c114d2d2128bf6399722d04eca078461a3bf33a90611041908390614795565b60007f00000000000000000000000000000000000000000000000000000000000000006040517f10fc49c100000000000000000000000000000000000000000000000000000000815267ffffffffffffffff8816600482015263ffffffff8516602482015273ffffffffffffffffffffffffffffffffffffffff91909116906310fc49c19060440160006040518083038186803b158015611c6357600080fd5b505afa158015611c77573d6000803e3d6000fd5b5050505066038d7ea4c68000821115611cbc576040517f8129bbcd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000611cc6610663565b90506000611d0987878080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506106f992505050565b90506000611d15612a48565b9050611d2486868486856134f2565b9998505050505050505050565b6060600e8054611d4090614aa4565b9050600003611d7b576040517f4f42be3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600e8054610f1590614aa4565b855185518560ff16601f831115611dfb576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f746f6f206d616e79207369676e657273000000000000000000000000000000006044820152606401610a5c565b80600003611e65576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f66206d75737420626520706f73697469766500000000000000000000000000006044820152606401610a5c565b818314611ef3576040517f89a61989000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f6f7261636c6520616464726573736573206f7574206f6620726567697374726160448201527f74696f6e000000000000000000000000000000000000000000000000000000006064820152608401610a5c565b611efe816003615271565b8311611f66576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f6661756c74792d6f7261636c65206620746f6f206869676800000000000000006044820152606401610a5c565b611f6e612a7c565b6040805160c0810182528a8152602081018a905260ff89169181018290526060810188905267ffffffffffffffff8716608082015260a0810186905290611fb5908861366e565b6005541561216a57600554600090611fcf90600190614db0565b9050600060058281548110611fe657611fe6614de0565b60009182526020822001546006805473ffffffffffffffffffffffffffffffffffffffff9092169350908490811061202057612020614de0565b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff85811684526004909252604080842080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000908116909155929091168084529220805490911690556005805491925090806120a0576120a0615288565b60008281526020902081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90810180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055019055600680548061210957612109615288565b60008281526020902081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90810180547fffffffffffffffffffffffff000000000000000000000000000000000000000016905501905550611fb5915050565b60005b8151518110156127215781518051600091908390811061218f5761218f614de0565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1603612214576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f7369676e6572206d757374206e6f7420626520656d70747900000000000000006044820152606401610a5c565b600073ffffffffffffffffffffffffffffffffffffffff168260200151828151811061224257612242614de0565b602002602001015173ffffffffffffffffffffffffffffffffffffffff16036122c7576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f7472616e736d6974746572206d757374206e6f7420626520656d7074790000006044820152606401610a5c565b600060046000846000015184815181106122e3576122e3614de0565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff16825281019190915260400160002054610100900460ff16600281111561232d5761232d61521e565b14612394576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f7265706561746564207369676e657220616464726573730000000000000000006044820152606401610a5c565b6040805180820190915260ff821681526001602082015282518051600491600091859081106123c5576123c5614de0565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff168252818101929092526040016000208251815460ff9091167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0082168117835592840151919283917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000016176101008360028111156124665761246661521e565b0217905550600091506124769050565b600460008460200151848151811061249057612490614de0565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff16825281019190915260400160002054610100900460ff1660028111156124da576124da61521e565b14612541576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f7265706561746564207472616e736d69747465722061646472657373000000006044820152606401610a5c565b6040805180820190915260ff82168152602081016002815250600460008460200151848151811061257457612574614de0565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff168252818101929092526040016000208251815460ff9091167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0082168117835592840151919283917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000016176101008360028111156126155761261561521e565b02179055505082518051600592508390811061263357612633614de0565b602090810291909101810151825460018101845560009384529282902090920180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff90931692909217909155820151805160069190839081106126af576126af614de0565b60209081029190910181015182546001810184556000938452919092200180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9092169190911790558061271981614e0f565b91505061216d565b506040810151600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660ff909216919091179055600180547fffffffff00000000ffffffffffffffffffffffffffffffffffffffffffffffff8116780100000000000000000000000000000000000000000000000063ffffffff43811682029290921780855592048116929182916014916127d9918491740100000000000000000000000000000000000000009004166152b7565b92506101000a81548163ffffffff021916908363ffffffff1602179055506128384630600160149054906101000a900463ffffffff1663ffffffff16856000015186602001518760400151886060015189608001518a60a00151613687565b600281905582518051600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1661010060ff9093169290920291909117905560015460208501516040808701516060880151608089015160a08a015193517f1591690b8638f5fb2dbec82ac741805ac5da8b45dc5263f4875b0496fdce4e05986128ef988b9891977401000000000000000000000000000000000000000090920463ffffffff169690959194919391926152d4565b60405180910390a15050505050505050505050565b6000806000600c8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015612974573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129989190614d60565b5093505092505080426129ab9190614db0565b600854640100000000900463ffffffff161080156129d85750600854640100000000900463ffffffff1615155b15612a055750506009547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16919050565b60008213612a42576040517f43d4cf6600000000000000000000000000000000000000000000000000000000815260048101839052602401610a5c565b50919050565b600a546000906106f4906064906107139062010000900461ffff16612aff565b612a70612a7c565b612a7981613732565b50565b60005473ffffffffffffffffffffffffffffffffffffffff163314612afd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401610a5c565b565b6000806000612b0c6108ef565b9092509050612b4482612b208360126151e3565b612b2b90600a61548a565b612b359087615271565b612b3f9190615499565b613827565b949350505050565b600068ffffffffffffffffff821115612be7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203760448201527f32206269747300000000000000000000000000000000000000000000000000006064820152608401610a5c565b5090565b600c546bffffffffffffffffffffffff16600003612c0557565b6000612c0f610e4f565b80519091506000819003612c4f576040517f30274b3a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600c54600090612c6e9083906bffffffffffffffffffffffff16614cef565b905060005b82811015612d395781600b6000868481518110612c9257612c92614de0565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282829054906101000a90046bffffffffffffffffffffffff16612cfa91906154ad565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff16021790555080612d3290614e0f565b9050612c73565b50612d4482826154d2565b600c8054600090612d649084906bffffffffffffffffffffffff16614d1a565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550505050565b612afd612a7c565b6040805161018081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e0810182905261010081018290526101208101829052610140810182905261016081019190915260085461010083015161ffff7501000000000000000000000000000000000000000000909204821691161115612e62576040517fdada758700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000612e7183600001516106f9565b90506000612e7d612a48565b90506000612e968560e001513a858860800151866134f2565b9050806bffffffffffffffffffffffff1685606001516bffffffffffffffffffffffff161015612ef2576040517ff4d678b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600954600090612f28907c0100000000000000000000000000000000000000000000000000000000900463ffffffff16426154fa565b905060003087604001518860a001518960c001516001612f48919061550d565b8a5180516020918201206101008d015160e08e0151604051612ffc98979695948c918c9132910173ffffffffffffffffffffffffffffffffffffffff9a8b168152988a1660208a015267ffffffffffffffff97881660408a0152959096166060880152608087019390935261ffff9190911660a086015263ffffffff90811660c08601526bffffffffffffffffffffffff9190911660e0850152919091166101008301529091166101208201526101400190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815282825280516020918201206101808401835280845230848301526bffffffffffffffffffffffff8716848401528a83015173ffffffffffffffffffffffffffffffffffffffff16606085015260a0808c015167ffffffffffffffff1660808087019190915260e0808e015163ffffffff90811693880193909352908d015168ffffffffffffffffff90811660c08801528b81169187019190915260085468010000000000000000810483166101008801526c0100000000000000000000000090048216610120870152908716610140860152881661016085015291519298509092506131159188910161552e565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152918152815160209283012060009384526007909252909120555092949350505050565b60006131976040518060a0016040528060608152602001606081526020016060815260200160608152602001606081525090565b6000808080806131a9888a018a615618565b84519499509297509095509350915060ff168015806131c9575084518114155b806131d5575083518114155b806131e1575082518114155b806131ed575081518114155b15613254576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f4669656c6473206d75737420626520657175616c206c656e67746800000000006044820152606401610a5c565b60005b818110156132ba5761329087828151811061327457613274614de0565b6020026020010151600090815260076020526040902054151590565b6132ba5761329f600183614db0565b81036132aa57600198505b6132b381614e0f565b9050613257565b50506040805160a0810182529586526020860194909452928401919091526060830152608082015290505b9250929050565b60006132f9826020615271565b613304856020615271565b613310886101446154fa565b61331a91906154fa565b61332491906154fa565b61332f9060006154fa565b905036811461339a576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f63616c6c64617461206c656e677468206d69736d6174636800000000000000006044820152606401610a5c565b50505050505050565b80515160ff1660005b8181101561065e576000613455846000015183815181106133cf576133cf614de0565b6020026020010151856020015184815181106133ed576133ed614de0565b60200260200101518660400151858151811061340b5761340b614de0565b60200260200101518760600151868151811061342957613429614de0565b60200260200101518860800151878151811061344757613447614de0565b6020026020010151886138c5565b9050600081600681111561346b5761346b61521e565b1480613488575060018160068111156134865761348661521e565b145b156134e15783518051839081106134a1576134a1614de0565b60209081029190910181015160405133815290917fc708e0440951fd63499c0f7a73819b469ee5dd3ecc356c0ab4eb7f18389009d9910160405180910390a25b506134eb81614e0f565b90506133ac565b600854600090700100000000000000000000000000000000900464ffffffffff1685101561353b57600854700100000000000000000000000000000000900464ffffffffff1694505b600854600090612710906135559063ffffffff1688615271565b61355f9190615499565b61356990876154fa565b60085490915060009088906135a29063ffffffff6c010000000000000000000000008204811691680100000000000000009004166152b7565b6135ac91906152b7565b63ffffffff16905060006135f66000368080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250613d9292505050565b90506000613617826136088587615271565b61361291906154fa565b613ed4565b905060008668ffffffffffffffffff168868ffffffffffffffffff168a68ffffffffffffffffff1661364991906154ad565b61365391906154ad565b905061365f81836154ad565b9b9a5050505050505050505050565b6000613678610e4f565b511115610dfb57610dfb612beb565b6000808a8a8a8a8a8a8a8a8a6040516020016136ab999897969594939291906156ea565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291905280516020909101207dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e01000000000000000000000000000000000000000000000000000000000000179150509998505050505050505050565b3373ffffffffffffffffffffffffffffffffffffffff8216036137b1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401610a5c565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b60006bffffffffffffffffffffffff821115612be7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203960448201527f36206269747300000000000000000000000000000000000000000000000000006064820152608401610a5c565b600080848060200190518101906138dc91906157b6565b905060003a8261012001518361010001516138f79190615890565b64ffffffffff166139089190615271565b905060008460ff166139506000368080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250613d9292505050565b61395a9190615499565b9050600061396b61361283856154fa565b905060006139783a613ed4565b90506000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663330605298e8e868b610160015168ffffffffffffffffff168c60e0015168ffffffffffffffffff168a6139e891906154ad565b6139f291906154ad565b336040518061016001604052808f6000015181526020018f6020015173ffffffffffffffffffffffffffffffffffffffff1681526020018f604001516bffffffffffffffffffffffff1681526020018f6060015173ffffffffffffffffffffffffffffffffffffffff1681526020018f6080015167ffffffffffffffff1681526020018f60a0015163ffffffff1681526020018f60c0015168ffffffffffffffffff1681526020018f60e0015168ffffffffffffffffff1681526020018f610100015164ffffffffff1681526020018f610120015164ffffffffff1681526020018f610140015163ffffffff168152506040518763ffffffff1660e01b8152600401613b03969594939291906158ae565b60408051808303816000875af1158015613b21573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613b45919061592a565b90925090506000826006811115613b5e57613b5e61521e565b1480613b7b57506001826006811115613b7957613b7961521e565b145b15613d815760008e815260076020526040812055613b9981856154ad565b336000908152600b602052604081208054909190613bc69084906bffffffffffffffffffffffff166154ad565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055508660e0015168ffffffffffffffffff16600c60008282829054906101000a90046bffffffffffffffffffffffff16613c2c91906154ad565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff16021790555086610160015168ffffffffffffffffff16600b6000613c77613ef3565b73ffffffffffffffffffffffffffffffffffffffff168152602081019190915260400160009081208054909190613cbd9084906bffffffffffffffffffffffff166154ad565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055508d7f08a4a0761e3c98d288cb4af9342660f49550d83139fb3b762b70d34bed6273688487848b60e001518c60c001518d6101600151604051613d78969594939291906bffffffffffffffffffffffff9687168152602081019590955292909416604084015268ffffffffffffffffff9081166060840152928316608083015290911660a082015260c00190565b60405180910390a25b509c9b505050505050505050505050565b600046613d9e81613f64565b15613e1a57606c73ffffffffffffffffffffffffffffffffffffffff1663c6f7de0e6040518163ffffffff1660e01b8152600401602060405180830381865afa158015613def573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613e13919061595d565b9392505050565b613e2381613f87565b15613ecb5773420000000000000000000000000000000000000f73ffffffffffffffffffffffffffffffffffffffff166349948e0e846040518060800160405280604881526020016159c360489139604051602001613e83929190615976565b6040516020818303038152906040526040518263ffffffff1660e01b8152600401613eae91906140df565b602060405180830381865afa158015613def573d6000803e3d6000fd5b50600092915050565b6000610730613ee1612904565b612b3584670de0b6b3a7640000615271565b60003073ffffffffffffffffffffffffffffffffffffffff16638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015613f40573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f491906159a5565b600061a4b1821480613f78575062066eed82145b8061073057505062066eee1490565b6000600a821480613f9957506101a482145b80613fa6575062aa37dc82145b80613fb2575061210582145b80613fbf575062014a3382145b8061073057505062014a341490565b604051806103e00160405280601f906020820280368337509192915050565b60008083601f840112613fff57600080fd5b50813567ffffffffffffffff81111561401757600080fd5b6020830191508360208285010111156132e557600080fd5b6000806020838503121561404257600080fd5b823567ffffffffffffffff81111561405957600080fd5b61406585828601613fed565b90969095509350505050565b60005b8381101561408c578181015183820152602001614074565b50506000910152565b600081518084526140ad816020860160208601614071565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000613e136020830184614095565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051610180810167ffffffffffffffff81118282101715614145576141456140f2565b60405290565b604051610160810167ffffffffffffffff81118282101715614145576141456140f2565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156141b6576141b66140f2565b604052919050565b600082601f8301126141cf57600080fd5b813567ffffffffffffffff8111156141e9576141e96140f2565b61421a60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8401160161416f565b81815284602083860101111561422f57600080fd5b816020850160208301376000918101602001919091529392505050565b60006020828403121561425e57600080fd5b813567ffffffffffffffff81111561427557600080fd5b612b44848285016141be565b73ffffffffffffffffffffffffffffffffffffffff81168114612a7957600080fd5b80356112dc81614281565b6bffffffffffffffffffffffff81168114612a7957600080fd5b80356112dc816142ae565b600080604083850312156142e657600080fd5b82356142f181614281565b91506020830135614301816142ae565b809150509250929050565b600081518084526020808501945080840160005b8381101561435257815173ffffffffffffffffffffffffffffffffffffffff1687529582019590820190600101614320565b509495945050505050565b602081526000613e13602083018461430c565b60006020828403121561438257600080fd5b5035919050565b60006020828403121561439b57600080fd5b813567ffffffffffffffff8111156143b257600080fd5b82016101608185031215613e1357600080fd5b8051825260208101516143f0602084018273ffffffffffffffffffffffffffffffffffffffff169052565b50604081015161441060408401826bffffffffffffffffffffffff169052565b506060810151614438606084018273ffffffffffffffffffffffffffffffffffffffff169052565b506080810151614454608084018267ffffffffffffffff169052565b5060a081015161446c60a084018263ffffffff169052565b5060c081015161448960c084018268ffffffffffffffffff169052565b5060e08101516144a660e084018268ffffffffffffffffff169052565b506101008181015164ffffffffff81168483015250506101208181015164ffffffffff81168483015250506101408181015163ffffffff8116848301525b50505050565b610160810161073082846143c5565b60008083601f84011261450b57600080fd5b50813567ffffffffffffffff81111561452357600080fd5b6020830191508360208260051b85010111156132e557600080fd5b60008060008060008060008060e0898b03121561455a57600080fd5b606089018a81111561456b57600080fd5b8998503567ffffffffffffffff8082111561458557600080fd5b6145918c838d01613fed565b909950975060808b01359150808211156145aa57600080fd5b6145b68c838d016144f9565b909750955060a08b01359150808211156145cf57600080fd5b506145dc8b828c016144f9565b999c989b50969995989497949560c00135949350505050565b63ffffffff81168114612a7957600080fd5b80356112dc816145f5565b64ffffffffff81168114612a7957600080fd5b80356112dc81614612565b803561ffff811681146112dc57600080fd5b67ffffffffffffffff81168114612a7957600080fd5b80356112dc81614642565b60ff81168114612a7957600080fd5b80356112dc81614663565b80357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff811681146112dc57600080fd5b600061018082840312156146bc57600080fd5b6146c4614121565b6146cd83614607565b81526146db60208401614607565b60208201526146ec60408401614607565b60408201526146fd60608401614607565b606082015261470e60808401614625565b608082015261471f60a08401614630565b60a082015261473060c08401614658565b60c082015261474160e08401614672565b60e082015261010061475481850161467d565b90820152610120614766848201614607565b90820152610140614778848201614630565b9082015261016061478a848201614630565b908201529392505050565b815163ffffffff168152610180810160208301516147bb602084018263ffffffff169052565b5060408301516147d3604084018263ffffffff169052565b5060608301516147eb606084018263ffffffff169052565b506080830151614804608084018264ffffffffff169052565b5060a083015161481a60a084018261ffff169052565b5060c083015161483660c084018267ffffffffffffffff169052565b5060e083015161484b60e084018260ff169052565b50610100838101517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16908301526101208084015163ffffffff16908301526101408084015161ffff908116918401919091526101608085015191821681850152905b505092915050565b6000806000806000608086880312156148ca57600080fd5b85356148d581614642565b9450602086013567ffffffffffffffff8111156148f157600080fd5b6148fd88828901613fed565b9095509350506040860135614911816145f5565b949793965091946060013592915050565b600067ffffffffffffffff82111561493c5761493c6140f2565b5060051b60200190565b600082601f83011261495757600080fd5b8135602061496c61496783614922565b61416f565b82815260059290921b8401810191818101908684111561498b57600080fd5b8286015b848110156149af5780356149a281614281565b835291830191830161498f565b509695505050505050565b60008060008060008060c087890312156149d357600080fd5b863567ffffffffffffffff808211156149eb57600080fd5b6149f78a838b01614946565b97506020890135915080821115614a0d57600080fd5b614a198a838b01614946565b9650614a2760408a01614672565b95506060890135915080821115614a3d57600080fd5b614a498a838b016141be565b9450614a5760808a01614658565b935060a0890135915080821115614a6d57600080fd5b50614a7a89828a016141be565b9150509295509295509295565b600060208284031215614a9957600080fd5b8135613e1381614281565b600181811c90821680614ab857607f821691505b602082108103612a42577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b601f82111561065e57600081815260208120601f850160051c81016020861015614b185750805b601f850160051c820191505b818110156108e757828155600101614b24565b67ffffffffffffffff831115614b4f57614b4f6140f2565b614b6383614b5d8354614aa4565b83614af1565b6000601f841160018114614bb55760008515614b7f5750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b178355614c4b565b6000838152602090207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0861690835b82811015614c045786850135825560209485019460019092019101614be4565b5086821015614c3f577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b68ffffffffffffffffff81168114612a7957600080fd5b80516112dc81614c52565b600060208284031215614c8657600080fd5b8151613e1381614c52565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006bffffffffffffffffffffffff80841680614d0e57614d0e614c91565b92169190910492915050565b6bffffffffffffffffffffffff828116828216039080821115614d3f57614d3f614cc0565b5092915050565b805169ffffffffffffffffffff811681146112dc57600080fd5b600080600080600060a08688031215614d7857600080fd5b614d8186614d46565b9450602086015193506040860151925060608601519150614da460808701614d46565b90509295509295909350565b8181038181111561073057610730614cc0565b600060208284031215614dd557600080fd5b8151613e1381614663565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203614e4057614e40614cc0565b5060010190565b80356112dc81614c52565b60006101608236031215614e6557600080fd5b614e6d61414b565b823567ffffffffffffffff811115614e8457600080fd5b614e90368286016141be565b82525060208301356020820152614ea9604084016142a3565b6040820152614eba606084016142c8565b6060820152614ecb60808401614e47565b6080820152614edc60a08401614658565b60a0820152614eed60c08401614658565b60c0820152614efe60e08401614607565b60e0820152610100614f11818501614630565b90820152610120614f23848201614658565b90820152610140614f358482016142a3565b9082015292915050565b600060208284031215614f5157600080fd5b8135613e1381614642565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112614f9157600080fd5b83018035915067ffffffffffffffff821115614fac57600080fd5b6020019150368190038213156132e557600080fd5b600060208284031215614fd357600080fd5b613e1382614630565b600060208284031215614fee57600080fd5b8135613e13816145f5565b805182526020810151615024602084018273ffffffffffffffffffffffffffffffffffffffff169052565b50604081015161504460408401826bffffffffffffffffffffffff169052565b50606081015161506c606084018273ffffffffffffffffffffffffffffffffffffffff169052565b506080810151615088608084018267ffffffffffffffff169052565b5060a08101516150a060a084018263ffffffff169052565b5060c08101516150bd60c084018268ffffffffffffffffff169052565b5060e08101516150da60e084018268ffffffffffffffffff169052565b506101008181015164ffffffffff9081169184019190915261012080830151909116908301526101408082015163ffffffff16908301526101608082015168ffffffffffffffffff8116828501526144e4565b73ffffffffffffffffffffffffffffffffffffffff8a8116825267ffffffffffffffff8a166020830152881660408201526102606060820181905281018690526000610280878982850137600083890182015261ffff8716608084015260a0830186905263ffffffff851660c0840152601f88017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01683010190506151d560e0830184614ff9565b9a9950505050505050505050565b60ff818116838216019081111561073057610730614cc0565b600060ff83168061520f5761520f614c91565b8060ff84160491505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b8183823760009101908152919050565b828152606082602083013760800192915050565b808202811582820484141761073057610730614cc0565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b63ffffffff818116838216019080821115614d3f57614d3f614cc0565b600061012063ffffffff808d1684528b6020850152808b166040850152508060608401526153048184018a61430c565b90508281036080840152615318818961430c565b905060ff871660a084015282810360c08401526153358187614095565b905067ffffffffffffffff851660e084015282810361010084015261535a8185614095565b9c9b505050505050505050505050565b600181815b808511156153c357817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048211156153a9576153a9614cc0565b808516156153b657918102915b93841c939080029061536f565b509250929050565b6000826153da57506001610730565b816153e757506000610730565b81600181146153fd576002811461540757615423565b6001915050610730565b60ff84111561541857615418614cc0565b50506001821b610730565b5060208310610133831016604e8410600b8410161715615446575081810a610730565b615450838361536a565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0482111561548257615482614cc0565b029392505050565b6000613e1360ff8416836153cb565b6000826154a8576154a8614c91565b500490565b6bffffffffffffffffffffffff818116838216019080821115614d3f57614d3f614cc0565b6bffffffffffffffffffffffff8181168382160280821691908281146148aa576148aa614cc0565b8082018082111561073057610730614cc0565b67ffffffffffffffff818116838216019080821115614d3f57614d3f614cc0565b61018081016107308284614ff9565b600082601f83011261554e57600080fd5b8135602061555e61496783614922565b82815260059290921b8401810191818101908684111561557d57600080fd5b8286015b848110156149af5780358352918301918301615581565b600082601f8301126155a957600080fd5b813560206155b961496783614922565b82815260059290921b840181019181810190868411156155d857600080fd5b8286015b848110156149af57803567ffffffffffffffff8111156155fc5760008081fd5b61560a8986838b01016141be565b8452509183019183016155dc565b600080600080600060a0868803121561563057600080fd5b853567ffffffffffffffff8082111561564857600080fd5b61565489838a0161553d565b9650602088013591508082111561566a57600080fd5b61567689838a01615598565b9550604088013591508082111561568c57600080fd5b61569889838a01615598565b945060608801359150808211156156ae57600080fd5b6156ba89838a01615598565b935060808801359150808211156156d057600080fd5b506156dd88828901615598565b9150509295509295909350565b60006101208b835273ffffffffffffffffffffffffffffffffffffffff8b16602084015267ffffffffffffffff808b1660408501528160608501526157318285018b61430c565b91508382036080850152615745828a61430c565b915060ff881660a085015283820360c08501526157628288614095565b90861660e0850152838103610100850152905061535a8185614095565b80516112dc81614281565b80516112dc816142ae565b80516112dc81614642565b80516112dc816145f5565b80516112dc81614612565b600061018082840312156157c957600080fd5b6157d1614121565b825181526157e16020840161577f565b60208201526157f26040840161578a565b60408201526158036060840161577f565b606082015261581460808401615795565b608082015261582560a084016157a0565b60a082015261583660c08401614c69565b60c082015261584760e08401614c69565b60e082015261010061585a8185016157ab565b9082015261012061586c8482016157ab565b9082015261014061587e8482016157a0565b9082015261016061478a848201614c69565b64ffffffffff818116838216019080821115614d3f57614d3f614cc0565b60006102008083526158c28184018a614095565b905082810360208401526158d68189614095565b6bffffffffffffffffffffffff88811660408601528716606085015273ffffffffffffffffffffffffffffffffffffffff86166080850152915061591f905060a08301846143c5565b979650505050505050565b6000806040838503121561593d57600080fd5b82516007811061594c57600080fd5b6020840151909250614301816142ae565b60006020828403121561596f57600080fd5b5051919050565b60008351615988818460208801614071565b83519083019061599c818360208801614071565b01949350505050565b6000602082840312156159b757600080fd5b8151613e138161428156fe307866666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666a164736f6c6343000813000a", + ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"fulfillmentGasPriceOverEstimationBP\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"feedStalenessSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasOverheadBeforeCallback\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasOverheadAfterCallback\",\"type\":\"uint32\"},{\"internalType\":\"uint40\",\"name\":\"minimumEstimateGasPriceWei\",\"type\":\"uint40\"},{\"internalType\":\"uint16\",\"name\":\"maxSupportedRequestDataVersion\",\"type\":\"uint16\"},{\"internalType\":\"uint64\",\"name\":\"fallbackUsdPerUnitLink\",\"type\":\"uint64\"},{\"internalType\":\"uint8\",\"name\":\"fallbackUsdPerUnitLinkDecimals\",\"type\":\"uint8\"},{\"internalType\":\"uint224\",\"name\":\"fallbackNativePerUnitLink\",\"type\":\"uint224\"},{\"internalType\":\"uint32\",\"name\":\"requestTimeoutSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"donFeeCentsUsd\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"operationFeeCentsUsd\",\"type\":\"uint16\"}],\"internalType\":\"structFunctionsBillingConfig\",\"name\":\"config\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"linkToNativeFeed\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"linkToUsdFeed\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"EmptyPublicKey\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InconsistentReportData\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientBalance\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidCalldata\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"message\",\"type\":\"string\"}],\"name\":\"InvalidConfig\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"int256\",\"name\":\"linkWei\",\"type\":\"int256\"}],\"name\":\"InvalidLinkWeiPrice\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidSubscription\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"int256\",\"name\":\"usdLink\",\"type\":\"int256\"}],\"name\":\"InvalidUsdLinkPrice\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"MustBeSubOwner\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NoTransmittersSet\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByRouter\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByRouterOwner\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PaymentTooLarge\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"message\",\"type\":\"string\"}],\"name\":\"ReportInvalid\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RouterMustBeSet\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnauthorizedPublicKeyChange\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnauthorizedSender\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnsupportedRequestDataVersion\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"requestId\",\"type\":\"bytes32\"}],\"name\":\"CommitmentDeleted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"previousConfigBlockNumber\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"configCount\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"signers\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"transmitters\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"onchainConfig\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"offchainConfigVersion\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"}],\"name\":\"ConfigSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"fulfillmentGasPriceOverEstimationBP\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"feedStalenessSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasOverheadBeforeCallback\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasOverheadAfterCallback\",\"type\":\"uint32\"},{\"internalType\":\"uint40\",\"name\":\"minimumEstimateGasPriceWei\",\"type\":\"uint40\"},{\"internalType\":\"uint16\",\"name\":\"maxSupportedRequestDataVersion\",\"type\":\"uint16\"},{\"internalType\":\"uint64\",\"name\":\"fallbackUsdPerUnitLink\",\"type\":\"uint64\"},{\"internalType\":\"uint8\",\"name\":\"fallbackUsdPerUnitLinkDecimals\",\"type\":\"uint8\"},{\"internalType\":\"uint224\",\"name\":\"fallbackNativePerUnitLink\",\"type\":\"uint224\"},{\"internalType\":\"uint32\",\"name\":\"requestTimeoutSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"donFeeCentsUsd\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"operationFeeCentsUsd\",\"type\":\"uint16\"}],\"indexed\":false,\"internalType\":\"structFunctionsBillingConfig\",\"name\":\"config\",\"type\":\"tuple\"}],\"name\":\"ConfigUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"requestId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"requestingContract\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"requestInitiator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"subscriptionId\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"subscriptionOwner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"dataVersion\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"flags\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"callbackGasLimit\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"requestId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"coordinator\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"estimatedTotalCostJuels\",\"type\":\"uint96\"},{\"internalType\":\"address\",\"name\":\"client\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"subscriptionId\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint72\",\"name\":\"adminFeeJuels\",\"type\":\"uint72\"},{\"internalType\":\"uint72\",\"name\":\"donFeeJuels\",\"type\":\"uint72\"},{\"internalType\":\"uint40\",\"name\":\"gasOverheadBeforeCallback\",\"type\":\"uint40\"},{\"internalType\":\"uint40\",\"name\":\"gasOverheadAfterCallback\",\"type\":\"uint40\"},{\"internalType\":\"uint32\",\"name\":\"timeoutTimestamp\",\"type\":\"uint32\"},{\"internalType\":\"uint72\",\"name\":\"operationFeeJuels\",\"type\":\"uint72\"}],\"indexed\":false,\"internalType\":\"structFunctionsResponse.CommitmentWithOperationFee\",\"name\":\"commitment\",\"type\":\"tuple\"}],\"name\":\"OracleRequest\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"requestId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"transmitter\",\"type\":\"address\"}],\"name\":\"OracleResponse\",\"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\":\"bytes32\",\"name\":\"requestId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"juelsPerGas\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"l1FeeShareWei\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"callbackCostJuels\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint72\",\"name\":\"donFeeJuels\",\"type\":\"uint72\"},{\"indexed\":false,\"internalType\":\"uint72\",\"name\":\"adminFeeJuels\",\"type\":\"uint72\"},{\"indexed\":false,\"internalType\":\"uint72\",\"name\":\"operationFeeJuels\",\"type\":\"uint72\"}],\"name\":\"RequestBilled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"epoch\",\"type\":\"uint32\"}],\"name\":\"Transmitted\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"requestId\",\"type\":\"bytes32\"}],\"name\":\"deleteCommitment\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"subscriptionId\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"gasPriceWei\",\"type\":\"uint256\"}],\"name\":\"estimateCost\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAdminFeeJuels\",\"outputs\":[{\"internalType\":\"uint72\",\"name\":\"\",\"type\":\"uint72\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getConfig\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"fulfillmentGasPriceOverEstimationBP\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"feedStalenessSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasOverheadBeforeCallback\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasOverheadAfterCallback\",\"type\":\"uint32\"},{\"internalType\":\"uint40\",\"name\":\"minimumEstimateGasPriceWei\",\"type\":\"uint40\"},{\"internalType\":\"uint16\",\"name\":\"maxSupportedRequestDataVersion\",\"type\":\"uint16\"},{\"internalType\":\"uint64\",\"name\":\"fallbackUsdPerUnitLink\",\"type\":\"uint64\"},{\"internalType\":\"uint8\",\"name\":\"fallbackUsdPerUnitLinkDecimals\",\"type\":\"uint8\"},{\"internalType\":\"uint224\",\"name\":\"fallbackNativePerUnitLink\",\"type\":\"uint224\"},{\"internalType\":\"uint32\",\"name\":\"requestTimeoutSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"donFeeCentsUsd\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"operationFeeCentsUsd\",\"type\":\"uint16\"}],\"internalType\":\"structFunctionsBillingConfig\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"getDONFeeJuels\",\"outputs\":[{\"internalType\":\"uint72\",\"name\":\"\",\"type\":\"uint72\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getDONPublicKey\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getOperationFeeJuels\",\"outputs\":[{\"internalType\":\"uint72\",\"name\":\"\",\"type\":\"uint72\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getThresholdPublicKey\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getUsdPerUnitLink\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getWeiPerUnitLink\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestConfigDetails\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"configCount\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blockNumber\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestConfigDigestAndEpoch\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"scanLogs\",\"type\":\"bool\"},{\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"epoch\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"oracleWithdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"oracleWithdrawAll\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_signers\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"_transmitters\",\"type\":\"address[]\"},{\"internalType\":\"uint8\",\"name\":\"_f\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"_onchainConfig\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"_offchainConfigVersion\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"_offchainConfig\",\"type\":\"bytes\"}],\"name\":\"setConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"donPublicKey\",\"type\":\"bytes\"}],\"name\":\"setDONPublicKey\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"thresholdPublicKey\",\"type\":\"bytes\"}],\"name\":\"setThresholdPublicKey\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"flags\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"requestingContract\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"availableBalance\",\"type\":\"uint96\"},{\"internalType\":\"uint72\",\"name\":\"adminFee\",\"type\":\"uint72\"},{\"internalType\":\"uint64\",\"name\":\"subscriptionId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"initiatedRequests\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"dataVersion\",\"type\":\"uint16\"},{\"internalType\":\"uint64\",\"name\":\"completedRequests\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"subscriptionOwner\",\"type\":\"address\"}],\"internalType\":\"structFunctionsResponse.RequestMeta\",\"name\":\"request\",\"type\":\"tuple\"}],\"name\":\"startRequest\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"requestId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"coordinator\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"estimatedTotalCostJuels\",\"type\":\"uint96\"},{\"internalType\":\"address\",\"name\":\"client\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"subscriptionId\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint72\",\"name\":\"adminFee\",\"type\":\"uint72\"},{\"internalType\":\"uint72\",\"name\":\"donFee\",\"type\":\"uint72\"},{\"internalType\":\"uint40\",\"name\":\"gasOverheadBeforeCallback\",\"type\":\"uint40\"},{\"internalType\":\"uint40\",\"name\":\"gasOverheadAfterCallback\",\"type\":\"uint40\"},{\"internalType\":\"uint32\",\"name\":\"timeoutTimestamp\",\"type\":\"uint32\"}],\"internalType\":\"structFunctionsResponse.Commitment\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[3]\",\"name\":\"reportContext\",\"type\":\"bytes32[3]\"},{\"internalType\":\"bytes\",\"name\":\"report\",\"type\":\"bytes\"},{\"internalType\":\"bytes32[]\",\"name\":\"rs\",\"type\":\"bytes32[]\"},{\"internalType\":\"bytes32[]\",\"name\":\"ss\",\"type\":\"bytes32[]\"},{\"internalType\":\"bytes32\",\"name\":\"rawVs\",\"type\":\"bytes32\"}],\"name\":\"transmit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"transmitters\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"typeAndVersion\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"fulfillmentGasPriceOverEstimationBP\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"feedStalenessSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasOverheadBeforeCallback\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasOverheadAfterCallback\",\"type\":\"uint32\"},{\"internalType\":\"uint40\",\"name\":\"minimumEstimateGasPriceWei\",\"type\":\"uint40\"},{\"internalType\":\"uint16\",\"name\":\"maxSupportedRequestDataVersion\",\"type\":\"uint16\"},{\"internalType\":\"uint64\",\"name\":\"fallbackUsdPerUnitLink\",\"type\":\"uint64\"},{\"internalType\":\"uint8\",\"name\":\"fallbackUsdPerUnitLinkDecimals\",\"type\":\"uint8\"},{\"internalType\":\"uint224\",\"name\":\"fallbackNativePerUnitLink\",\"type\":\"uint224\"},{\"internalType\":\"uint32\",\"name\":\"requestTimeoutSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"donFeeCentsUsd\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"operationFeeCentsUsd\",\"type\":\"uint16\"}],\"internalType\":\"structFunctionsBillingConfig\",\"name\":\"config\",\"type\":\"tuple\"}],\"name\":\"updateConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x60a06040523480156200001157600080fd5b506040516200619f3803806200619f8339810160408190526200003491620004db565b83838383833380600081620000905760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000c357620000c3816200014e565b5050506001600160a01b038116620000ee57604051632530e88560e11b815260040160405180910390fd5b6001600160a01b03908116608052600c80546001600160601b03166c0100000000000000000000000085841602179055600d80546001600160a01b0319169183169190911790556200014083620001f9565b505050505050505062000742565b336001600160a01b03821603620001a85760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000087565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b620002036200039e565b80516008805460208401516040808601516060870151608088015160a089015160c08a015160e08b015160ff16600160f81b026001600160f81b036001600160401b03909216600160b81b02919091166001600160b81b0361ffff938416600160a81b0261ffff60a81b1964ffffffffff909616600160801b029590951666ffffffffffffff60801b1963ffffffff9788166c010000000000000000000000000263ffffffff60601b19998916680100000000000000000299909916600160401b600160801b03199b8916640100000000026001600160401b0319909d169e89169e909e179b909b17999099169b909b1795909517979097169590951717969096161792909217909255610100840151610120850151909316600160e01b026001600160e01b0390931692909217600955610140830151600a80546101608601518416620100000263ffffffff19919091169290931691909117919091179055517f2e2c8535dcc25459d519f2300c114d2d2128bf6399722d04eca078461a3bf33a906200039390839062000639565b60405180910390a150565b620003a8620003aa565b565b6000546001600160a01b03163314620003a85760405162461bcd60e51b815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000604482015260640162000087565b80516001600160a01b03811681146200041e57600080fd5b919050565b60405161018081016001600160401b03811182821017156200045557634e487b7160e01b600052604160045260246000fd5b60405290565b805163ffffffff811681146200041e57600080fd5b805164ffffffffff811681146200041e57600080fd5b805161ffff811681146200041e57600080fd5b80516001600160401b03811681146200041e57600080fd5b805160ff811681146200041e57600080fd5b80516001600160e01b03811681146200041e57600080fd5b6000806000808486036101e0811215620004f457600080fd5b620004ff8662000406565b945061018080601f19830112156200051657600080fd5b6200052062000423565b915062000530602088016200045b565b825262000540604088016200045b565b602083015262000553606088016200045b565b604083015262000566608088016200045b565b60608301526200057960a0880162000470565b60808301526200058c60c0880162000486565b60a08301526200059f60e0880162000499565b60c0830152610100620005b4818901620004b1565b60e0840152610120620005c9818a01620004c3565b828501526101409150620005df828a016200045b565b90840152610160620005f389820162000486565b8285015262000604838a0162000486565b90840152509093506200061d90506101a0860162000406565b91506200062e6101c0860162000406565b905092959194509250565b815163ffffffff1681526101808101602083015162000660602084018263ffffffff169052565b50604083015162000679604084018263ffffffff169052565b50606083015162000692606084018263ffffffff169052565b506080830151620006ac608084018264ffffffffff169052565b5060a0830151620006c360a084018261ffff169052565b5060c0830151620006df60c08401826001600160401b03169052565b5060e0830151620006f560e084018260ff169052565b50610100838101516001600160e01b0316908301526101208084015163ffffffff16908301526101408084015161ffff908116918401919091526101609384015116929091019190915290565b608051615a17620007886000396000818161079c01528181610c7d01528181610f110152818161102701528181611b31015281816129ef015261397f0152615a176000f3fe608060405234801561001057600080fd5b50600436106101a35760003560e01c80638da5cb5b116100ee578063d227d24511610097578063e4ddcea611610071578063e4ddcea6146105d5578063f2f22ef1146105eb578063f2fde38b146105f3578063f6ea41f61461060657600080fd5b8063d227d2451461058a578063d328a91e146105ba578063e3d0e712146105c257600080fd5b8063b1dc65a4116100c8578063b1dc65a414610396578063ba9c924d146103a9578063c3f909d4146103bc57600080fd5b80638da5cb5b1461032e578063a631571e14610356578063afcb95d71461037657600080fd5b80637d4807871161015057806381f1b9381161012a57806381f1b938146102a657806381ff7048146102ae57806385b214cf1461031b57600080fd5b80637d480787146102765780637f15e1661461027e578063814118341461029157600080fd5b806366316d8d1161018157806366316d8d1461023c5780637212762f1461024f57806379ba50971461026e57600080fd5b8063083a5466146101a8578063181f5a77146101bd578063626f458c1461020f575b600080fd5b6101bb6101b636600461402f565b61060e565b005b6101f96040518060400160405280601c81526020017f46756e6374696f6e7320436f6f7264696e61746f722076322e302e300000000081525081565b60405161020691906140df565b60405180910390f35b61022261021d36600461424c565b610663565b60405168ffffffffffffffffff9091168152602001610206565b6101bb61024a3660046142d3565b6106a0565b610257610859565b6040805192835260ff909116602083015201610206565b6101bb610a6c565b6101bb610b69565b6101bb61028c36600461402f565b610d69565b610299610db9565b604051610206919061435d565b6101f9610e28565b6102f860015460025463ffffffff74010000000000000000000000000000000000000000830481169378010000000000000000000000000000000000000000000000009093041691565b6040805163ffffffff948516815293909216602084015290820152606001610206565b6101bb610329366004614370565b610ef9565b60005460405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610206565b610369610364366004614389565b610fb6565b60405161020691906144ea565b604080516001815260006020820181905291810191909152606001610206565b6101bb6103a436600461453e565b61124b565b6101bb6103b73660046146a9565b611862565b61057d6040805161018081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e0810182905261010081018290526101208101829052610140810182905261016081019190915250604080516101808101825260085463ffffffff80821683526401000000008204811660208401526801000000000000000082048116938301939093526c01000000000000000000000000810483166060830152700100000000000000000000000000000000810464ffffffffff1660808301527501000000000000000000000000000000000000000000810461ffff90811660a084015277010000000000000000000000000000000000000000000000820467ffffffffffffffff1660c08401527f010000000000000000000000000000000000000000000000000000000000000090910460ff1660e08301526009547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff81166101008401527c01000000000000000000000000000000000000000000000000000000009004909216610120820152600a5480831661014083015262010000900490911661016082015290565b6040516102069190614795565b61059d6105983660046148b2565b611b2d565b6040516bffffffffffffffffffffffff9091168152602001610206565b6101f9611c9b565b6101bb6105d03660046149ba565b611cf2565b6105dd61286e565b604051908152602001610206565b6102226129b2565b6101bb610601366004614a87565b6129d7565b6102226129eb565b610616612a7c565b6000819003610651576040517f4f42be3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600f61065e828483614b37565b505050565b600a5460009061069a9060649061067d9061ffff16612aff565b6106879190614cb0565b6bffffffffffffffffffffffff16612b4c565b92915050565b6106a8612beb565b806bffffffffffffffffffffffff166000036106e25750336000908152600b60205260409020546bffffffffffffffffffffffff1661073c565b336000908152600b60205260409020546bffffffffffffffffffffffff8083169116101561073c576040517ff4d678b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336000908152600b6020526040812080548392906107699084906bffffffffffffffffffffffff16614cdb565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055506107be7f000000000000000000000000000000000000000000000000000000000000000090565b6040517f66316d8d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301526bffffffffffffffffffffffff8416602483015291909116906366316d8d90604401600060405180830381600087803b15801561083d57600080fd5b505af1158015610851573d6000803e3d6000fd5b505050505050565b600080600080600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa1580156108cc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108f09190614d21565b5093505092505080426109039190614d71565b600854640100000000900463ffffffff161080156109305750600854640100000000900463ffffffff1615155b1561098d57505060085477010000000000000000000000000000000000000000000000810467ffffffffffffffff16937f010000000000000000000000000000000000000000000000000000000000000090910460ff1692509050565b600082136109cf576040517f56b22ab8000000000000000000000000000000000000000000000000000000008152600481018390526024015b60405180910390fd5b600d54604080517f313ce5670000000000000000000000000000000000000000000000000000000081529051849273ffffffffffffffffffffffffffffffffffffffff169163313ce5679160048083019260209291908290030181865afa158015610a3e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a629190614d84565b9350935050509091565b60015473ffffffffffffffffffffffffffffffffffffffff163314610aed576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064016109c6565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b610b71612d97565b610b79612beb565b6000610b83610db9565b905060005b8151811015610d65576000600b6000848481518110610ba957610ba9614da1565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff168252810191909152604001600020546bffffffffffffffffffffffff1690508015610d54576000600b6000858581518110610c0857610c08614da1565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550610c9f7f000000000000000000000000000000000000000000000000000000000000000090565b73ffffffffffffffffffffffffffffffffffffffff166366316d8d848481518110610ccc57610ccc614da1565b6020026020010151836040518363ffffffff1660e01b8152600401610d2192919073ffffffffffffffffffffffffffffffffffffffff9290921682526bffffffffffffffffffffffff16602082015260400190565b600060405180830381600087803b158015610d3b57600080fd5b505af1158015610d4f573d6000803e3d6000fd5b505050505b50610d5e81614dd0565b9050610b88565b5050565b610d71612a7c565b6000819003610dac576040517f4f42be3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600e61065e828483614b37565b60606006805480602002602001604051908101604052809291908181526020018280548015610e1e57602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311610df3575b5050505050905090565b6060600f8054610e3790614aa4565b9050600003610e72576040517f4f42be3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600f8054610e7f90614aa4565b80601f0160208091040260200160405190810160405280929190818152602001828054610eab90614aa4565b8015610e1e5780601f10610ecd57610100808354040283529160200191610e1e565b820191906000526020600020905b815481529060010190602001808311610edb57509395945050505050565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610f68576040517fc41a5b0900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008181526007602052604080822091909155517f8a4b97add3359bd6bcf5e82874363670eb5ad0f7615abddbd0ed0a3a98f0f41690610fab9083815260200190565b60405180910390a150565b6040805161016081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810182905261012081018290526101408101919091523373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161461107e576040517fc41a5b0900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061109161108c84614e2a565b612d9f565b90506110a36060840160408501614a87565b815173ffffffffffffffffffffffffffffffffffffffff91909116907f718684b6c135c1277575a7b5c7365bc9587d5ebfd899230d5fa11360f6143bfb326110f160c0880160a08901614f17565b61110361016089016101408a01614a87565b61110d8980614f34565b61111f6101208c016101008d01614f99565b60208c01356111356101008e0160e08f01614fb4565b8b60405161114b99989796959493929190615105565b60405180910390a360405180610160016040528082600001518152602001826020015173ffffffffffffffffffffffffffffffffffffffff16815260200182604001516bffffffffffffffffffffffff168152602001826060015173ffffffffffffffffffffffffffffffffffffffff168152602001826080015167ffffffffffffffff1681526020018260a0015163ffffffff1681526020018260c0015168ffffffffffffffffff1681526020018260e0015168ffffffffffffffffff16815260200182610100015164ffffffffff16815260200182610120015164ffffffffff16815260200182610140015163ffffffff168152509150505b919050565b6000806112588989613163565b915091508115611269575050611858565b604080518b3580825262ffffff6020808f0135600881901c9290921690840152909290917fb04e63db38c49950639fa09d29872f21f5d49d614f3a969d8adf3d4b52e41a62910160405180910390a16112c68b8b8b8b8b8b6132ec565b6003546000906002906112e49060ff808216916101009004166151bb565b6112ee91906151d4565b6112f99060016151bb565b60ff169050888114611367576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f77726f6e67206e756d626572206f66207369676e61747572657300000000000060448201526064016109c6565b8887146113f6576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f7265706f727420727320616e64207373206d757374206265206f66206571756160448201527f6c206c656e67746800000000000000000000000000000000000000000000000060648201526084016109c6565b3360009081526004602090815260408083208151808301909252805460ff80821684529293919291840191610100909104166002811115611439576114396151f6565b600281111561144a5761144a6151f6565b9052509050600281602001516002811115611467576114676151f6565b141580156114b057506006816000015160ff168154811061148a5761148a614da1565b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff163314155b15611517576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f756e617574686f72697a6564207472616e736d6974746572000000000000000060448201526064016109c6565b50505050611523613fce565b60008a8a604051611535929190615225565b60405190819003812061154c918e90602001615235565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181528282528051602091820120838301909252600080845290830152915060005b898110156118485760006001848984602081106115b5576115b5614da1565b6115c291901a601b6151bb565b8e8e868181106115d4576115d4614da1565b905060200201358d8d878181106115ed576115ed614da1565b905060200201356040516000815260200160405260405161162a949392919093845260ff9290921660208401526040830152606082015260800190565b6020604051602081039080840390855afa15801561164c573d6000803e3d6000fd5b5050604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081015173ffffffffffffffffffffffffffffffffffffffff811660009081526004602090815290849020838501909452835460ff808216855292965092945084019161010090041660028111156116cc576116cc6151f6565b60028111156116dd576116dd6151f6565b90525092506001836020015160028111156116fa576116fa6151f6565b14611761576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f61646472657373206e6f7420617574686f72697a656420746f207369676e000060448201526064016109c6565b8251600090869060ff16601f811061177b5761177b614da1565b602002015173ffffffffffffffffffffffffffffffffffffffff16146117fd576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f6e6f6e2d756e69717565207369676e617475726500000000000000000000000060448201526064016109c6565b8085846000015160ff16601f811061181757611817614da1565b73ffffffffffffffffffffffffffffffffffffffff90921660209290920201525061184181614dd0565b9050611596565b505050611854826133a3565b5050505b5050505050505050565b61186a612d97565b80516008805460208401516040808601516060870151608088015160a089015160c08a015160e08b015160ff167f0100000000000000000000000000000000000000000000000000000000000000027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff67ffffffffffffffff90921677010000000000000000000000000000000000000000000000029190911676ffffffffffffffffffffffffffffffffffffffffffffff61ffff9384167501000000000000000000000000000000000000000000027fffffffffffffffffff0000ffffffffffffffffffffffffffffffffffffffffff64ffffffffff90961670010000000000000000000000000000000002959095167fffffffffffffffffff00000000000000ffffffffffffffffffffffffffffffff63ffffffff9788166c01000000000000000000000000027fffffffffffffffffffffffffffffffff00000000ffffffffffffffffffffffff9989166801000000000000000002999099167fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff9b8916640100000000027fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000909d169e89169e909e179b909b17999099169b909b17959095179790971695909517179690961617929092179092556101008401516101208501519093167c0100000000000000000000000000000000000000000000000000000000027bffffffffffffffffffffffffffffffffffffffffffffffffffffffff90931692909217600955610140830151600a8054610160860151841662010000027fffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000919091169290931691909117919091179055517f2e2c8535dcc25459d519f2300c114d2d2128bf6399722d04eca078461a3bf33a90610fab908390614795565b60007f00000000000000000000000000000000000000000000000000000000000000006040517f10fc49c100000000000000000000000000000000000000000000000000000000815267ffffffffffffffff8816600482015263ffffffff8516602482015273ffffffffffffffffffffffffffffffffffffffff91909116906310fc49c19060440160006040518083038186803b158015611bcd57600080fd5b505afa158015611be1573d6000803e3d6000fd5b5050505066038d7ea4c68000821115611c26576040517f8129bbcd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000611c306129eb565b90506000611c7387878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061066392505050565b90506000611c7f6129b2565b9050611c8e86868486856134f2565b9998505050505050505050565b6060600e8054611caa90614aa4565b9050600003611ce5576040517f4f42be3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600e8054610e7f90614aa4565b855185518560ff16601f831115611d65576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f746f6f206d616e79207369676e6572730000000000000000000000000000000060448201526064016109c6565b80600003611dcf576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f66206d75737420626520706f736974697665000000000000000000000000000060448201526064016109c6565b818314611e5d576040517f89a61989000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f6f7261636c6520616464726573736573206f7574206f6620726567697374726160448201527f74696f6e0000000000000000000000000000000000000000000000000000000060648201526084016109c6565b611e68816003615249565b8311611ed0576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f6661756c74792d6f7261636c65206620746f6f2068696768000000000000000060448201526064016109c6565b611ed8612a7c565b6040805160c0810182528a8152602081018a905260ff89169181018290526060810188905267ffffffffffffffff8716608082015260a0810186905290611f1f908861366e565b600554156120d457600554600090611f3990600190614d71565b9050600060058281548110611f5057611f50614da1565b60009182526020822001546006805473ffffffffffffffffffffffffffffffffffffffff90921693509084908110611f8a57611f8a614da1565b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff85811684526004909252604080842080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00009081169091559290911680845292208054909116905560058054919250908061200a5761200a615260565b60008281526020902081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90810180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055019055600680548061207357612073615260565b60008281526020902081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90810180547fffffffffffffffffffffffff000000000000000000000000000000000000000016905501905550611f1f915050565b60005b81515181101561268b578151805160009190839081106120f9576120f9614da1565b602002602001015173ffffffffffffffffffffffffffffffffffffffff160361217e576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f7369676e6572206d757374206e6f7420626520656d707479000000000000000060448201526064016109c6565b600073ffffffffffffffffffffffffffffffffffffffff16826020015182815181106121ac576121ac614da1565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1603612231576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f7472616e736d6974746572206d757374206e6f7420626520656d70747900000060448201526064016109c6565b6000600460008460000151848151811061224d5761224d614da1565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff16825281019190915260400160002054610100900460ff166002811115612297576122976151f6565b146122fe576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f7265706561746564207369676e6572206164647265737300000000000000000060448201526064016109c6565b6040805180820190915260ff8216815260016020820152825180516004916000918590811061232f5761232f614da1565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff168252818101929092526040016000208251815460ff9091167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0082168117835592840151919283917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000016176101008360028111156123d0576123d06151f6565b0217905550600091506123e09050565b60046000846020015184815181106123fa576123fa614da1565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff16825281019190915260400160002054610100900460ff166002811115612444576124446151f6565b146124ab576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f7265706561746564207472616e736d697474657220616464726573730000000060448201526064016109c6565b6040805180820190915260ff8216815260208101600281525060046000846020015184815181106124de576124de614da1565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff168252818101929092526040016000208251815460ff9091167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0082168117835592840151919283917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000161761010083600281111561257f5761257f6151f6565b02179055505082518051600592508390811061259d5761259d614da1565b602090810291909101810151825460018101845560009384529282902090920180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909316929092179091558201518051600691908390811061261957612619614da1565b60209081029190910181015182546001810184556000938452919092200180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9092169190911790558061268381614dd0565b9150506120d7565b506040810151600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660ff909216919091179055600180547fffffffff00000000ffffffffffffffffffffffffffffffffffffffffffffffff8116780100000000000000000000000000000000000000000000000063ffffffff43811682029290921780855592048116929182916014916127439184917401000000000000000000000000000000000000000090041661528f565b92506101000a81548163ffffffff021916908363ffffffff1602179055506127a24630600160149054906101000a900463ffffffff1663ffffffff16856000015186602001518760400151886060015189608001518a60a00151613687565b600281905582518051600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1661010060ff9093169290920291909117905560015460208501516040808701516060880151608089015160a08a015193517f1591690b8638f5fb2dbec82ac741805ac5da8b45dc5263f4875b0496fdce4e0598612859988b9891977401000000000000000000000000000000000000000090920463ffffffff169690959194919391926152ac565b60405180910390a15050505050505050505050565b6000806000600c8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa1580156128de573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129029190614d21565b5093505092505080426129159190614d71565b600854640100000000900463ffffffff161080156129425750600854640100000000900463ffffffff1615155b1561296f5750506009547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16919050565b600082136129ac576040517f43d4cf66000000000000000000000000000000000000000000000000000000008152600481018390526024016109c6565b50919050565b600a546000906129d29060649061067d9062010000900461ffff16612aff565b905090565b6129df612a7c565b6129e881613732565b50565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16632a905ccc6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612a58573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129d2919061534d565b60005473ffffffffffffffffffffffffffffffffffffffff163314612afd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e65720000000000000000000060448201526064016109c6565b565b6000806000612b0c610859565b9092509050612b4482612b208360126151bb565b612b2b90600a61548a565b612b359087615249565b612b3f9190615499565b613827565b949350505050565b600068ffffffffffffffffff821115612be7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203760448201527f322062697473000000000000000000000000000000000000000000000000000060648201526084016109c6565b5090565b600c546bffffffffffffffffffffffff16600003612c0557565b6000612c0f610db9565b80519091506000819003612c4f576040517f30274b3a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600c54600090612c6e9083906bffffffffffffffffffffffff16614cb0565b905060005b82811015612d395781600b6000868481518110612c9257612c92614da1565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282829054906101000a90046bffffffffffffffffffffffff16612cfa91906154ad565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff16021790555080612d3290614dd0565b9050612c73565b50612d4482826154d2565b600c8054600090612d649084906bffffffffffffffffffffffff16614cdb565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550505050565b612afd612a7c565b6040805161018081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e0810182905261010081018290526101208101829052610140810182905261016081019190915260085461010083015161ffff7501000000000000000000000000000000000000000000909204821691161115612e62576040517fdada758700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000612e718360000151610663565b90506000612e7d6129b2565b90506000612e968560e001513a858860800151866134f2565b9050806bffffffffffffffffffffffff1685606001516bffffffffffffffffffffffff161015612ef2576040517ff4d678b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600954600090612f28907c0100000000000000000000000000000000000000000000000000000000900463ffffffff16426154fa565b905060003087604001518860a001518960c001516001612f48919061550d565b8a5180516020918201206101008d015160e08e0151604051612ffc98979695948c918c9132910173ffffffffffffffffffffffffffffffffffffffff9a8b168152988a1660208a015267ffffffffffffffff97881660408a0152959096166060880152608087019390935261ffff9190911660a086015263ffffffff90811660c08601526bffffffffffffffffffffffff9190911660e0850152919091166101008301529091166101208201526101400190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815282825280516020918201206101808401835280845230848301526bffffffffffffffffffffffff8716848401528a83015173ffffffffffffffffffffffffffffffffffffffff16606085015260a0808c015167ffffffffffffffff1660808087019190915260e0808e015163ffffffff90811693880193909352908d015168ffffffffffffffffff90811660c08801528b81169187019190915260085468010000000000000000810483166101008801526c0100000000000000000000000090048216610120870152908716610140860152881661016085015291519298509092506131159188910161552e565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152918152815160209283012060009384526007909252909120555092949350505050565b60006131976040518060a0016040528060608152602001606081526020016060815260200160608152602001606081525090565b6000808080806131a9888a018a615618565b84519499509297509095509350915060ff168015806131c9575084518114155b806131d5575083518114155b806131e1575082518114155b806131ed575081518114155b15613254576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f4669656c6473206d75737420626520657175616c206c656e677468000000000060448201526064016109c6565b60005b818110156132ba5761329087828151811061327457613274614da1565b6020026020010151600090815260076020526040902054151590565b6132ba5761329f600183614d71565b81036132aa57600198505b6132b381614dd0565b9050613257565b50506040805160a0810182529586526020860194909452928401919091526060830152608082015290505b9250929050565b60006132f9826020615249565b613304856020615249565b613310886101446154fa565b61331a91906154fa565b61332491906154fa565b61332f9060006154fa565b905036811461339a576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f63616c6c64617461206c656e677468206d69736d61746368000000000000000060448201526064016109c6565b50505050505050565b80515160ff1660005b8181101561065e576000613455846000015183815181106133cf576133cf614da1565b6020026020010151856020015184815181106133ed576133ed614da1565b60200260200101518660400151858151811061340b5761340b614da1565b60200260200101518760600151868151811061342957613429614da1565b60200260200101518860800151878151811061344757613447614da1565b6020026020010151886138c5565b9050600081600681111561346b5761346b6151f6565b148061348857506001816006811115613486576134866151f6565b145b156134e15783518051839081106134a1576134a1614da1565b60209081029190910181015160405133815290917fc708e0440951fd63499c0f7a73819b469ee5dd3ecc356c0ab4eb7f18389009d9910160405180910390a25b506134eb81614dd0565b90506133ac565b600854600090700100000000000000000000000000000000900464ffffffffff1685101561353b57600854700100000000000000000000000000000000900464ffffffffff1694505b600854600090612710906135559063ffffffff1688615249565b61355f9190615499565b61356990876154fa565b60085490915060009088906135a29063ffffffff6c0100000000000000000000000082048116916801000000000000000090041661528f565b6135ac919061528f565b63ffffffff16905060006135f66000368080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250613d9292505050565b90506000613617826136088587615249565b61361291906154fa565b613ed4565b905060008668ffffffffffffffffff168868ffffffffffffffffff168a68ffffffffffffffffff1661364991906154ad565b61365391906154ad565b905061365f81836154ad565b9b9a5050505050505050505050565b6000613678610db9565b511115610d6557610d65612beb565b6000808a8a8a8a8a8a8a8a8a6040516020016136ab999897969594939291906156ea565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291905280516020909101207dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e01000000000000000000000000000000000000000000000000000000000000179150509998505050505050505050565b3373ffffffffffffffffffffffffffffffffffffffff8216036137b1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c6600000000000000000060448201526064016109c6565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b60006bffffffffffffffffffffffff821115612be7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203960448201527f362062697473000000000000000000000000000000000000000000000000000060648201526084016109c6565b600080848060200190518101906138dc91906157b6565b905060003a8261012001518361010001516138f79190615890565b64ffffffffff166139089190615249565b905060008460ff166139506000368080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250613d9292505050565b61395a9190615499565b9050600061396b61361283856154fa565b905060006139783a613ed4565b90506000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663330605298e8e868b610160015168ffffffffffffffffff168c60e0015168ffffffffffffffffff168a6139e891906154ad565b6139f291906154ad565b336040518061016001604052808f6000015181526020018f6020015173ffffffffffffffffffffffffffffffffffffffff1681526020018f604001516bffffffffffffffffffffffff1681526020018f6060015173ffffffffffffffffffffffffffffffffffffffff1681526020018f6080015167ffffffffffffffff1681526020018f60a0015163ffffffff1681526020018f60c0015168ffffffffffffffffff1681526020018f60e0015168ffffffffffffffffff1681526020018f610100015164ffffffffff1681526020018f610120015164ffffffffff1681526020018f610140015163ffffffff168152506040518763ffffffff1660e01b8152600401613b03969594939291906158ae565b60408051808303816000875af1158015613b21573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613b45919061592a565b90925090506000826006811115613b5e57613b5e6151f6565b1480613b7b57506001826006811115613b7957613b796151f6565b145b15613d815760008e815260076020526040812055613b9981856154ad565b336000908152600b602052604081208054909190613bc69084906bffffffffffffffffffffffff166154ad565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055508660e0015168ffffffffffffffffff16600c60008282829054906101000a90046bffffffffffffffffffffffff16613c2c91906154ad565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff16021790555086610160015168ffffffffffffffffff16600b6000613c77613ef3565b73ffffffffffffffffffffffffffffffffffffffff168152602081019190915260400160009081208054909190613cbd9084906bffffffffffffffffffffffff166154ad565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055508d7f08a4a0761e3c98d288cb4af9342660f49550d83139fb3b762b70d34bed6273688487848b60e001518c60c001518d6101600151604051613d78969594939291906bffffffffffffffffffffffff9687168152602081019590955292909416604084015268ffffffffffffffffff9081166060840152928316608083015290911660a082015260c00190565b60405180910390a25b509c9b505050505050505050505050565b600046613d9e81613f64565b15613e1a57606c73ffffffffffffffffffffffffffffffffffffffff1663c6f7de0e6040518163ffffffff1660e01b8152600401602060405180830381865afa158015613def573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613e13919061595d565b9392505050565b613e2381613f87565b15613ecb5773420000000000000000000000000000000000000f73ffffffffffffffffffffffffffffffffffffffff166349948e0e846040518060800160405280604881526020016159c360489139604051602001613e83929190615976565b6040516020818303038152906040526040518263ffffffff1660e01b8152600401613eae91906140df565b602060405180830381865afa158015613def573d6000803e3d6000fd5b50600092915050565b600061069a613ee161286e565b612b3584670de0b6b3a7640000615249565b60003073ffffffffffffffffffffffffffffffffffffffff16638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015613f40573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129d291906159a5565b600061a4b1821480613f78575062066eed82145b8061069a57505062066eee1490565b6000600a821480613f9957506101a482145b80613fa6575062aa37dc82145b80613fb2575061210582145b80613fbf575062014a3382145b8061069a57505062014a341490565b604051806103e00160405280601f906020820280368337509192915050565b60008083601f840112613fff57600080fd5b50813567ffffffffffffffff81111561401757600080fd5b6020830191508360208285010111156132e557600080fd5b6000806020838503121561404257600080fd5b823567ffffffffffffffff81111561405957600080fd5b61406585828601613fed565b90969095509350505050565b60005b8381101561408c578181015183820152602001614074565b50506000910152565b600081518084526140ad816020860160208601614071565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000613e136020830184614095565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051610180810167ffffffffffffffff81118282101715614145576141456140f2565b60405290565b604051610160810167ffffffffffffffff81118282101715614145576141456140f2565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156141b6576141b66140f2565b604052919050565b600082601f8301126141cf57600080fd5b813567ffffffffffffffff8111156141e9576141e96140f2565b61421a60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8401160161416f565b81815284602083860101111561422f57600080fd5b816020850160208301376000918101602001919091529392505050565b60006020828403121561425e57600080fd5b813567ffffffffffffffff81111561427557600080fd5b612b44848285016141be565b73ffffffffffffffffffffffffffffffffffffffff811681146129e857600080fd5b803561124681614281565b6bffffffffffffffffffffffff811681146129e857600080fd5b8035611246816142ae565b600080604083850312156142e657600080fd5b82356142f181614281565b91506020830135614301816142ae565b809150509250929050565b600081518084526020808501945080840160005b8381101561435257815173ffffffffffffffffffffffffffffffffffffffff1687529582019590820190600101614320565b509495945050505050565b602081526000613e13602083018461430c565b60006020828403121561438257600080fd5b5035919050565b60006020828403121561439b57600080fd5b813567ffffffffffffffff8111156143b257600080fd5b82016101608185031215613e1357600080fd5b8051825260208101516143f0602084018273ffffffffffffffffffffffffffffffffffffffff169052565b50604081015161441060408401826bffffffffffffffffffffffff169052565b506060810151614438606084018273ffffffffffffffffffffffffffffffffffffffff169052565b506080810151614454608084018267ffffffffffffffff169052565b5060a081015161446c60a084018263ffffffff169052565b5060c081015161448960c084018268ffffffffffffffffff169052565b5060e08101516144a660e084018268ffffffffffffffffff169052565b506101008181015164ffffffffff81168483015250506101208181015164ffffffffff81168483015250506101408181015163ffffffff8116848301525b50505050565b610160810161069a82846143c5565b60008083601f84011261450b57600080fd5b50813567ffffffffffffffff81111561452357600080fd5b6020830191508360208260051b85010111156132e557600080fd5b60008060008060008060008060e0898b03121561455a57600080fd5b606089018a81111561456b57600080fd5b8998503567ffffffffffffffff8082111561458557600080fd5b6145918c838d01613fed565b909950975060808b01359150808211156145aa57600080fd5b6145b68c838d016144f9565b909750955060a08b01359150808211156145cf57600080fd5b506145dc8b828c016144f9565b999c989b50969995989497949560c00135949350505050565b63ffffffff811681146129e857600080fd5b8035611246816145f5565b64ffffffffff811681146129e857600080fd5b803561124681614612565b803561ffff8116811461124657600080fd5b67ffffffffffffffff811681146129e857600080fd5b803561124681614642565b60ff811681146129e857600080fd5b803561124681614663565b80357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8116811461124657600080fd5b600061018082840312156146bc57600080fd5b6146c4614121565b6146cd83614607565b81526146db60208401614607565b60208201526146ec60408401614607565b60408201526146fd60608401614607565b606082015261470e60808401614625565b608082015261471f60a08401614630565b60a082015261473060c08401614658565b60c082015261474160e08401614672565b60e082015261010061475481850161467d565b90820152610120614766848201614607565b90820152610140614778848201614630565b9082015261016061478a848201614630565b908201529392505050565b815163ffffffff168152610180810160208301516147bb602084018263ffffffff169052565b5060408301516147d3604084018263ffffffff169052565b5060608301516147eb606084018263ffffffff169052565b506080830151614804608084018264ffffffffff169052565b5060a083015161481a60a084018261ffff169052565b5060c083015161483660c084018267ffffffffffffffff169052565b5060e083015161484b60e084018260ff169052565b50610100838101517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16908301526101208084015163ffffffff16908301526101408084015161ffff908116918401919091526101608085015191821681850152905b505092915050565b6000806000806000608086880312156148ca57600080fd5b85356148d581614642565b9450602086013567ffffffffffffffff8111156148f157600080fd5b6148fd88828901613fed565b9095509350506040860135614911816145f5565b949793965091946060013592915050565b600067ffffffffffffffff82111561493c5761493c6140f2565b5060051b60200190565b600082601f83011261495757600080fd5b8135602061496c61496783614922565b61416f565b82815260059290921b8401810191818101908684111561498b57600080fd5b8286015b848110156149af5780356149a281614281565b835291830191830161498f565b509695505050505050565b60008060008060008060c087890312156149d357600080fd5b863567ffffffffffffffff808211156149eb57600080fd5b6149f78a838b01614946565b97506020890135915080821115614a0d57600080fd5b614a198a838b01614946565b9650614a2760408a01614672565b95506060890135915080821115614a3d57600080fd5b614a498a838b016141be565b9450614a5760808a01614658565b935060a0890135915080821115614a6d57600080fd5b50614a7a89828a016141be565b9150509295509295509295565b600060208284031215614a9957600080fd5b8135613e1381614281565b600181811c90821680614ab857607f821691505b6020821081036129ac577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b601f82111561065e57600081815260208120601f850160051c81016020861015614b185750805b601f850160051c820191505b8181101561085157828155600101614b24565b67ffffffffffffffff831115614b4f57614b4f6140f2565b614b6383614b5d8354614aa4565b83614af1565b6000601f841160018114614bb55760008515614b7f5750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b178355614c4b565b6000838152602090207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0861690835b82811015614c045786850135825560209485019460019092019101614be4565b5086821015614c3f577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006bffffffffffffffffffffffff80841680614ccf57614ccf614c52565b92169190910492915050565b6bffffffffffffffffffffffff828116828216039080821115614d0057614d00614c81565b5092915050565b805169ffffffffffffffffffff8116811461124657600080fd5b600080600080600060a08688031215614d3957600080fd5b614d4286614d07565b9450602086015193506040860151925060608601519150614d6560808701614d07565b90509295509295909350565b8181038181111561069a5761069a614c81565b600060208284031215614d9657600080fd5b8151613e1381614663565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203614e0157614e01614c81565b5060010190565b68ffffffffffffffffff811681146129e857600080fd5b803561124681614e08565b60006101608236031215614e3d57600080fd5b614e4561414b565b823567ffffffffffffffff811115614e5c57600080fd5b614e68368286016141be565b82525060208301356020820152614e81604084016142a3565b6040820152614e92606084016142c8565b6060820152614ea360808401614e1f565b6080820152614eb460a08401614658565b60a0820152614ec560c08401614658565b60c0820152614ed660e08401614607565b60e0820152610100614ee9818501614630565b90820152610120614efb848201614658565b90820152610140614f0d8482016142a3565b9082015292915050565b600060208284031215614f2957600080fd5b8135613e1381614642565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112614f6957600080fd5b83018035915067ffffffffffffffff821115614f8457600080fd5b6020019150368190038213156132e557600080fd5b600060208284031215614fab57600080fd5b613e1382614630565b600060208284031215614fc657600080fd5b8135613e13816145f5565b805182526020810151614ffc602084018273ffffffffffffffffffffffffffffffffffffffff169052565b50604081015161501c60408401826bffffffffffffffffffffffff169052565b506060810151615044606084018273ffffffffffffffffffffffffffffffffffffffff169052565b506080810151615060608084018267ffffffffffffffff169052565b5060a081015161507860a084018263ffffffff169052565b5060c081015161509560c084018268ffffffffffffffffff169052565b5060e08101516150b260e084018268ffffffffffffffffff169052565b506101008181015164ffffffffff9081169184019190915261012080830151909116908301526101408082015163ffffffff16908301526101608082015168ffffffffffffffffff8116828501526144e4565b73ffffffffffffffffffffffffffffffffffffffff8a8116825267ffffffffffffffff8a166020830152881660408201526102606060820181905281018690526000610280878982850137600083890182015261ffff8716608084015260a0830186905263ffffffff851660c0840152601f88017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01683010190506151ad60e0830184614fd1565b9a9950505050505050505050565b60ff818116838216019081111561069a5761069a614c81565b600060ff8316806151e7576151e7614c52565b8060ff84160491505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b8183823760009101908152919050565b828152606082602083013760800192915050565b808202811582820484141761069a5761069a614c81565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b63ffffffff818116838216019080821115614d0057614d00614c81565b600061012063ffffffff808d1684528b6020850152808b166040850152508060608401526152dc8184018a61430c565b905082810360808401526152f0818961430c565b905060ff871660a084015282810360c084015261530d8187614095565b905067ffffffffffffffff851660e08401528281036101008401526153328185614095565b9c9b505050505050505050505050565b805161124681614e08565b60006020828403121561535f57600080fd5b8151613e1381614e08565b600181815b808511156153c357817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048211156153a9576153a9614c81565b808516156153b657918102915b93841c939080029061536f565b509250929050565b6000826153da5750600161069a565b816153e75750600061069a565b81600181146153fd576002811461540757615423565b600191505061069a565b60ff84111561541857615418614c81565b50506001821b61069a565b5060208310610133831016604e8410600b8410161715615446575081810a61069a565b615450838361536a565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0482111561548257615482614c81565b029392505050565b6000613e1360ff8416836153cb565b6000826154a8576154a8614c52565b500490565b6bffffffffffffffffffffffff818116838216019080821115614d0057614d00614c81565b6bffffffffffffffffffffffff8181168382160280821691908281146148aa576148aa614c81565b8082018082111561069a5761069a614c81565b67ffffffffffffffff818116838216019080821115614d0057614d00614c81565b610180810161069a8284614fd1565b600082601f83011261554e57600080fd5b8135602061555e61496783614922565b82815260059290921b8401810191818101908684111561557d57600080fd5b8286015b848110156149af5780358352918301918301615581565b600082601f8301126155a957600080fd5b813560206155b961496783614922565b82815260059290921b840181019181810190868411156155d857600080fd5b8286015b848110156149af57803567ffffffffffffffff8111156155fc5760008081fd5b61560a8986838b01016141be565b8452509183019183016155dc565b600080600080600060a0868803121561563057600080fd5b853567ffffffffffffffff8082111561564857600080fd5b61565489838a0161553d565b9650602088013591508082111561566a57600080fd5b61567689838a01615598565b9550604088013591508082111561568c57600080fd5b61569889838a01615598565b945060608801359150808211156156ae57600080fd5b6156ba89838a01615598565b935060808801359150808211156156d057600080fd5b506156dd88828901615598565b9150509295509295909350565b60006101208b835273ffffffffffffffffffffffffffffffffffffffff8b16602084015267ffffffffffffffff808b1660408501528160608501526157318285018b61430c565b91508382036080850152615745828a61430c565b915060ff881660a085015283820360c08501526157628288614095565b90861660e085015283810361010085015290506153328185614095565b805161124681614281565b8051611246816142ae565b805161124681614642565b8051611246816145f5565b805161124681614612565b600061018082840312156157c957600080fd5b6157d1614121565b825181526157e16020840161577f565b60208201526157f26040840161578a565b60408201526158036060840161577f565b606082015261581460808401615795565b608082015261582560a084016157a0565b60a082015261583660c08401615342565b60c082015261584760e08401615342565b60e082015261010061585a8185016157ab565b9082015261012061586c8482016157ab565b9082015261014061587e8482016157a0565b9082015261016061478a848201615342565b64ffffffffff818116838216019080821115614d0057614d00614c81565b60006102008083526158c28184018a614095565b905082810360208401526158d68189614095565b6bffffffffffffffffffffffff88811660408601528716606085015273ffffffffffffffffffffffffffffffffffffffff86166080850152915061591f905060a08301846143c5565b979650505050505050565b6000806040838503121561593d57600080fd5b82516007811061594c57600080fd5b6020840151909250614301816142ae565b60006020828403121561596f57600080fd5b5051919050565b60008351615988818460208801614071565b83519083019061599c818360208801614071565b01949350505050565b6000602082840312156159b757600080fd5b8151613e138161428156fe307866666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666a164736f6c6343000813000a", } var FunctionsCoordinatorABI = FunctionsCoordinatorMetaData.ABI @@ -251,9 +251,9 @@ func (_FunctionsCoordinator *FunctionsCoordinatorCallerSession) EstimateCost(sub return _FunctionsCoordinator.Contract.EstimateCost(&_FunctionsCoordinator.CallOpts, subscriptionId, data, callbackGasLimit, gasPriceWei) } -func (_FunctionsCoordinator *FunctionsCoordinatorCaller) GetAdminFee(opts *bind.CallOpts) (*big.Int, error) { +func (_FunctionsCoordinator *FunctionsCoordinatorCaller) GetAdminFeeJuels(opts *bind.CallOpts) (*big.Int, error) { var out []interface{} - err := _FunctionsCoordinator.contract.Call(opts, &out, "getAdminFee") + err := _FunctionsCoordinator.contract.Call(opts, &out, "getAdminFeeJuels") if err != nil { return *new(*big.Int), err @@ -265,12 +265,12 @@ func (_FunctionsCoordinator *FunctionsCoordinatorCaller) GetAdminFee(opts *bind. } -func (_FunctionsCoordinator *FunctionsCoordinatorSession) GetAdminFee() (*big.Int, error) { - return _FunctionsCoordinator.Contract.GetAdminFee(&_FunctionsCoordinator.CallOpts) +func (_FunctionsCoordinator *FunctionsCoordinatorSession) GetAdminFeeJuels() (*big.Int, error) { + return _FunctionsCoordinator.Contract.GetAdminFeeJuels(&_FunctionsCoordinator.CallOpts) } -func (_FunctionsCoordinator *FunctionsCoordinatorCallerSession) GetAdminFee() (*big.Int, error) { - return _FunctionsCoordinator.Contract.GetAdminFee(&_FunctionsCoordinator.CallOpts) +func (_FunctionsCoordinator *FunctionsCoordinatorCallerSession) GetAdminFeeJuels() (*big.Int, error) { + return _FunctionsCoordinator.Contract.GetAdminFeeJuels(&_FunctionsCoordinator.CallOpts) } func (_FunctionsCoordinator *FunctionsCoordinatorCaller) GetConfig(opts *bind.CallOpts) (FunctionsBillingConfig, error) { @@ -295,9 +295,9 @@ func (_FunctionsCoordinator *FunctionsCoordinatorCallerSession) GetConfig() (Fun return _FunctionsCoordinator.Contract.GetConfig(&_FunctionsCoordinator.CallOpts) } -func (_FunctionsCoordinator *FunctionsCoordinatorCaller) GetDONFee(opts *bind.CallOpts, arg0 []byte) (*big.Int, error) { +func (_FunctionsCoordinator *FunctionsCoordinatorCaller) GetDONFeeJuels(opts *bind.CallOpts, arg0 []byte) (*big.Int, error) { var out []interface{} - err := _FunctionsCoordinator.contract.Call(opts, &out, "getDONFee", arg0) + err := _FunctionsCoordinator.contract.Call(opts, &out, "getDONFeeJuels", arg0) if err != nil { return *new(*big.Int), err @@ -309,12 +309,12 @@ func (_FunctionsCoordinator *FunctionsCoordinatorCaller) GetDONFee(opts *bind.Ca } -func (_FunctionsCoordinator *FunctionsCoordinatorSession) GetDONFee(arg0 []byte) (*big.Int, error) { - return _FunctionsCoordinator.Contract.GetDONFee(&_FunctionsCoordinator.CallOpts, arg0) +func (_FunctionsCoordinator *FunctionsCoordinatorSession) GetDONFeeJuels(arg0 []byte) (*big.Int, error) { + return _FunctionsCoordinator.Contract.GetDONFeeJuels(&_FunctionsCoordinator.CallOpts, arg0) } -func (_FunctionsCoordinator *FunctionsCoordinatorCallerSession) GetDONFee(arg0 []byte) (*big.Int, error) { - return _FunctionsCoordinator.Contract.GetDONFee(&_FunctionsCoordinator.CallOpts, arg0) +func (_FunctionsCoordinator *FunctionsCoordinatorCallerSession) GetDONFeeJuels(arg0 []byte) (*big.Int, error) { + return _FunctionsCoordinator.Contract.GetDONFeeJuels(&_FunctionsCoordinator.CallOpts, arg0) } func (_FunctionsCoordinator *FunctionsCoordinatorCaller) GetDONPublicKey(opts *bind.CallOpts) ([]byte, error) { @@ -339,9 +339,9 @@ func (_FunctionsCoordinator *FunctionsCoordinatorCallerSession) GetDONPublicKey( return _FunctionsCoordinator.Contract.GetDONPublicKey(&_FunctionsCoordinator.CallOpts) } -func (_FunctionsCoordinator *FunctionsCoordinatorCaller) GetOperationFee(opts *bind.CallOpts) (*big.Int, error) { +func (_FunctionsCoordinator *FunctionsCoordinatorCaller) GetOperationFeeJuels(opts *bind.CallOpts) (*big.Int, error) { var out []interface{} - err := _FunctionsCoordinator.contract.Call(opts, &out, "getOperationFee") + err := _FunctionsCoordinator.contract.Call(opts, &out, "getOperationFeeJuels") if err != nil { return *new(*big.Int), err @@ -353,12 +353,12 @@ func (_FunctionsCoordinator *FunctionsCoordinatorCaller) GetOperationFee(opts *b } -func (_FunctionsCoordinator *FunctionsCoordinatorSession) GetOperationFee() (*big.Int, error) { - return _FunctionsCoordinator.Contract.GetOperationFee(&_FunctionsCoordinator.CallOpts) +func (_FunctionsCoordinator *FunctionsCoordinatorSession) GetOperationFeeJuels() (*big.Int, error) { + return _FunctionsCoordinator.Contract.GetOperationFeeJuels(&_FunctionsCoordinator.CallOpts) } -func (_FunctionsCoordinator *FunctionsCoordinatorCallerSession) GetOperationFee() (*big.Int, error) { - return _FunctionsCoordinator.Contract.GetOperationFee(&_FunctionsCoordinator.CallOpts) +func (_FunctionsCoordinator *FunctionsCoordinatorCallerSession) GetOperationFeeJuels() (*big.Int, error) { + return _FunctionsCoordinator.Contract.GetOperationFeeJuels(&_FunctionsCoordinator.CallOpts) } func (_FunctionsCoordinator *FunctionsCoordinatorCaller) GetThresholdPublicKey(opts *bind.CallOpts) ([]byte, error) { @@ -1922,15 +1922,15 @@ func (_FunctionsCoordinator *FunctionsCoordinator) Address() common.Address { type FunctionsCoordinatorInterface interface { EstimateCost(opts *bind.CallOpts, subscriptionId uint64, data []byte, callbackGasLimit uint32, gasPriceWei *big.Int) (*big.Int, error) - GetAdminFee(opts *bind.CallOpts) (*big.Int, error) + GetAdminFeeJuels(opts *bind.CallOpts) (*big.Int, error) GetConfig(opts *bind.CallOpts) (FunctionsBillingConfig, error) - GetDONFee(opts *bind.CallOpts, arg0 []byte) (*big.Int, error) + GetDONFeeJuels(opts *bind.CallOpts, arg0 []byte) (*big.Int, error) GetDONPublicKey(opts *bind.CallOpts) ([]byte, error) - GetOperationFee(opts *bind.CallOpts) (*big.Int, error) + GetOperationFeeJuels(opts *bind.CallOpts) (*big.Int, error) GetThresholdPublicKey(opts *bind.CallOpts) ([]byte, error) diff --git a/core/gethwrappers/functions/generated/functions_coordinator_1_1_0/functions_coordinator_1_1_0.go b/core/gethwrappers/functions/generated/functions_coordinator_1_1_0/functions_coordinator_1_1_0.go index 32e66090c7d..c51f2545374 100644 --- a/core/gethwrappers/functions/generated/functions_coordinator_1_1_0/functions_coordinator_1_1_0.go +++ b/core/gethwrappers/functions/generated/functions_coordinator_1_1_0/functions_coordinator_1_1_0.go @@ -72,7 +72,7 @@ type FunctionsResponseRequestMeta struct { var FunctionsCoordinator110MetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"fulfillmentGasPriceOverEstimationBP\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"feedStalenessSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasOverheadBeforeCallback\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasOverheadAfterCallback\",\"type\":\"uint32\"},{\"internalType\":\"uint72\",\"name\":\"donFee\",\"type\":\"uint72\"},{\"internalType\":\"uint40\",\"name\":\"minimumEstimateGasPriceWei\",\"type\":\"uint40\"},{\"internalType\":\"uint16\",\"name\":\"maxSupportedRequestDataVersion\",\"type\":\"uint16\"},{\"internalType\":\"uint224\",\"name\":\"fallbackNativePerUnitLink\",\"type\":\"uint224\"},{\"internalType\":\"uint32\",\"name\":\"requestTimeoutSeconds\",\"type\":\"uint32\"}],\"internalType\":\"structFunctionsBilling.Config\",\"name\":\"config\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"linkToNativeFeed\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"EmptyPublicKey\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InconsistentReportData\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientBalance\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidCalldata\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"message\",\"type\":\"string\"}],\"name\":\"InvalidConfig\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"int256\",\"name\":\"linkWei\",\"type\":\"int256\"}],\"name\":\"InvalidLinkWeiPrice\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidSubscription\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"MustBeSubOwner\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NoTransmittersSet\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByRouter\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByRouterOwner\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PaymentTooLarge\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"message\",\"type\":\"string\"}],\"name\":\"ReportInvalid\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RouterMustBeSet\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnauthorizedPublicKeyChange\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnauthorizedSender\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnsupportedRequestDataVersion\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"requestId\",\"type\":\"bytes32\"}],\"name\":\"CommitmentDeleted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"previousConfigBlockNumber\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"configCount\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"signers\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"transmitters\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"onchainConfig\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"offchainConfigVersion\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"}],\"name\":\"ConfigSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"fulfillmentGasPriceOverEstimationBP\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"feedStalenessSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasOverheadBeforeCallback\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasOverheadAfterCallback\",\"type\":\"uint32\"},{\"internalType\":\"uint72\",\"name\":\"donFee\",\"type\":\"uint72\"},{\"internalType\":\"uint40\",\"name\":\"minimumEstimateGasPriceWei\",\"type\":\"uint40\"},{\"internalType\":\"uint16\",\"name\":\"maxSupportedRequestDataVersion\",\"type\":\"uint16\"},{\"internalType\":\"uint224\",\"name\":\"fallbackNativePerUnitLink\",\"type\":\"uint224\"},{\"internalType\":\"uint32\",\"name\":\"requestTimeoutSeconds\",\"type\":\"uint32\"}],\"indexed\":false,\"internalType\":\"structFunctionsBilling.Config\",\"name\":\"config\",\"type\":\"tuple\"}],\"name\":\"ConfigUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"requestId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"requestingContract\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"requestInitiator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"subscriptionId\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"subscriptionOwner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"dataVersion\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"flags\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"callbackGasLimit\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"requestId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"coordinator\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"estimatedTotalCostJuels\",\"type\":\"uint96\"},{\"internalType\":\"address\",\"name\":\"client\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"subscriptionId\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint72\",\"name\":\"adminFee\",\"type\":\"uint72\"},{\"internalType\":\"uint72\",\"name\":\"donFee\",\"type\":\"uint72\"},{\"internalType\":\"uint40\",\"name\":\"gasOverheadBeforeCallback\",\"type\":\"uint40\"},{\"internalType\":\"uint40\",\"name\":\"gasOverheadAfterCallback\",\"type\":\"uint40\"},{\"internalType\":\"uint32\",\"name\":\"timeoutTimestamp\",\"type\":\"uint32\"}],\"indexed\":false,\"internalType\":\"structFunctionsResponse.Commitment\",\"name\":\"commitment\",\"type\":\"tuple\"}],\"name\":\"OracleRequest\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"requestId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"transmitter\",\"type\":\"address\"}],\"name\":\"OracleResponse\",\"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\":\"bytes32\",\"name\":\"requestId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"juelsPerGas\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"l1FeeShareWei\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"callbackCostJuels\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"totalCostJuels\",\"type\":\"uint96\"}],\"name\":\"RequestBilled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"epoch\",\"type\":\"uint32\"}],\"name\":\"Transmitted\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"requestId\",\"type\":\"bytes32\"}],\"name\":\"deleteCommitment\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"subscriptionId\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"gasPriceWei\",\"type\":\"uint256\"}],\"name\":\"estimateCost\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAdminFee\",\"outputs\":[{\"internalType\":\"uint72\",\"name\":\"\",\"type\":\"uint72\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getConfig\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"fulfillmentGasPriceOverEstimationBP\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"feedStalenessSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasOverheadBeforeCallback\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasOverheadAfterCallback\",\"type\":\"uint32\"},{\"internalType\":\"uint72\",\"name\":\"donFee\",\"type\":\"uint72\"},{\"internalType\":\"uint40\",\"name\":\"minimumEstimateGasPriceWei\",\"type\":\"uint40\"},{\"internalType\":\"uint16\",\"name\":\"maxSupportedRequestDataVersion\",\"type\":\"uint16\"},{\"internalType\":\"uint224\",\"name\":\"fallbackNativePerUnitLink\",\"type\":\"uint224\"},{\"internalType\":\"uint32\",\"name\":\"requestTimeoutSeconds\",\"type\":\"uint32\"}],\"internalType\":\"structFunctionsBilling.Config\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"getDONFee\",\"outputs\":[{\"internalType\":\"uint72\",\"name\":\"\",\"type\":\"uint72\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getDONPublicKey\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getThresholdPublicKey\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getWeiPerUnitLink\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestConfigDetails\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"configCount\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blockNumber\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestConfigDigestAndEpoch\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"scanLogs\",\"type\":\"bool\"},{\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"epoch\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"oracleWithdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"oracleWithdrawAll\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_signers\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"_transmitters\",\"type\":\"address[]\"},{\"internalType\":\"uint8\",\"name\":\"_f\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"_onchainConfig\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"_offchainConfigVersion\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"_offchainConfig\",\"type\":\"bytes\"}],\"name\":\"setConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"donPublicKey\",\"type\":\"bytes\"}],\"name\":\"setDONPublicKey\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"thresholdPublicKey\",\"type\":\"bytes\"}],\"name\":\"setThresholdPublicKey\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"flags\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"requestingContract\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"availableBalance\",\"type\":\"uint96\"},{\"internalType\":\"uint72\",\"name\":\"adminFee\",\"type\":\"uint72\"},{\"internalType\":\"uint64\",\"name\":\"subscriptionId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"initiatedRequests\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"dataVersion\",\"type\":\"uint16\"},{\"internalType\":\"uint64\",\"name\":\"completedRequests\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"subscriptionOwner\",\"type\":\"address\"}],\"internalType\":\"structFunctionsResponse.RequestMeta\",\"name\":\"request\",\"type\":\"tuple\"}],\"name\":\"startRequest\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"requestId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"coordinator\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"estimatedTotalCostJuels\",\"type\":\"uint96\"},{\"internalType\":\"address\",\"name\":\"client\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"subscriptionId\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint72\",\"name\":\"adminFee\",\"type\":\"uint72\"},{\"internalType\":\"uint72\",\"name\":\"donFee\",\"type\":\"uint72\"},{\"internalType\":\"uint40\",\"name\":\"gasOverheadBeforeCallback\",\"type\":\"uint40\"},{\"internalType\":\"uint40\",\"name\":\"gasOverheadAfterCallback\",\"type\":\"uint40\"},{\"internalType\":\"uint32\",\"name\":\"timeoutTimestamp\",\"type\":\"uint32\"}],\"internalType\":\"structFunctionsResponse.Commitment\",\"name\":\"commitment\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[3]\",\"name\":\"reportContext\",\"type\":\"bytes32[3]\"},{\"internalType\":\"bytes\",\"name\":\"report\",\"type\":\"bytes\"},{\"internalType\":\"bytes32[]\",\"name\":\"rs\",\"type\":\"bytes32[]\"},{\"internalType\":\"bytes32[]\",\"name\":\"ss\",\"type\":\"bytes32[]\"},{\"internalType\":\"bytes32\",\"name\":\"rawVs\",\"type\":\"bytes32\"}],\"name\":\"transmit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"transmitters\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"typeAndVersion\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"fulfillmentGasPriceOverEstimationBP\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"feedStalenessSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasOverheadBeforeCallback\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasOverheadAfterCallback\",\"type\":\"uint32\"},{\"internalType\":\"uint72\",\"name\":\"donFee\",\"type\":\"uint72\"},{\"internalType\":\"uint40\",\"name\":\"minimumEstimateGasPriceWei\",\"type\":\"uint40\"},{\"internalType\":\"uint16\",\"name\":\"maxSupportedRequestDataVersion\",\"type\":\"uint16\"},{\"internalType\":\"uint224\",\"name\":\"fallbackNativePerUnitLink\",\"type\":\"uint224\"},{\"internalType\":\"uint32\",\"name\":\"requestTimeoutSeconds\",\"type\":\"uint32\"}],\"internalType\":\"structFunctionsBilling.Config\",\"name\":\"config\",\"type\":\"tuple\"}],\"name\":\"updateConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x60a06040523480156200001157600080fd5b50604051620056f7380380620056f783398101604081905262000034916200046d565b8282828233806000816200008f5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000c257620000c28162000139565b5050506001600160a01b038116620000ed57604051632530e88560e11b815260040160405180910390fd5b6001600160a01b03908116608052600b80549183166c01000000000000000000000000026001600160601b039092169190911790556200012d82620001e4565b5050505050506200062c565b336001600160a01b03821603620001935760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000086565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b620001ee62000342565b80516008805460208401516040808601516060870151608088015160a089015160c08a015161ffff16600160f01b026001600160f01b0364ffffffffff909216600160c81b0264ffffffffff60c81b196001600160481b03909416600160801b0293909316600160801b600160f01b031963ffffffff9586166c010000000000000000000000000263ffffffff60601b19978716680100000000000000000297909716600160401b600160801b0319998716640100000000026001600160401b0319909b169c87169c909c1799909917979097169990991793909317959095169390931793909317929092169390931790915560e0830151610100840151909216600160e01b026001600160e01b0390921691909117600955517f5f32d06f5e83eda3a68e0e964ef2e6af5cb613e8117aa103c2d6bca5f5184862906200033790839062000576565b60405180910390a150565b6200034c6200034e565b565b6000546001600160a01b031633146200034c5760405162461bcd60e51b815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000604482015260640162000086565b80516001600160a01b0381168114620003c257600080fd5b919050565b60405161012081016001600160401b0381118282101715620003f957634e487b7160e01b600052604160045260246000fd5b60405290565b805163ffffffff81168114620003c257600080fd5b80516001600160481b0381168114620003c257600080fd5b805164ffffffffff81168114620003c257600080fd5b805161ffff81168114620003c257600080fd5b80516001600160e01b0381168114620003c257600080fd5b60008060008385036101608112156200048557600080fd5b6200049085620003aa565b935061012080601f1983011215620004a757600080fd5b620004b1620003c7565b9150620004c160208701620003ff565b8252620004d160408701620003ff565b6020830152620004e460608701620003ff565b6040830152620004f760808701620003ff565b60608301526200050a60a0870162000414565b60808301526200051d60c087016200042c565b60a08301526200053060e0870162000442565b60c08301526101006200054581880162000455565b60e084015262000557828801620003ff565b908301525091506200056d6101408501620003aa565b90509250925092565b815163ffffffff908116825260208084015182169083015260408084015182169083015260608084015191821690830152610120820190506080830151620005c960808401826001600160481b03169052565b5060a0830151620005e360a084018264ffffffffff169052565b5060c0830151620005fa60c084018261ffff169052565b5060e08301516200061660e08401826001600160e01b03169052565b506101009283015163ffffffff16919092015290565b6080516150856200067260003960008181610845015281816109d301528181610ca601528181610f3a0152818161104501528181611789015261349001526150856000f3fe608060405234801561001057600080fd5b506004361061018d5760003560e01c806381ff7048116100e3578063c3f909d41161008c578063e3d0e71211610066578063e3d0e71214610560578063e4ddcea614610573578063f2fde38b1461058957600080fd5b8063c3f909d4146103b0578063d227d24514610528578063d328a91e1461055857600080fd5b8063a631571e116100bd578063a631571e1461035d578063afcb95d71461037d578063b1dc65a41461039d57600080fd5b806381ff7048146102b557806385b214cf146103225780638da5cb5b1461033557600080fd5b806366316d8d116101455780637f15e1661161011f5780637f15e16614610285578063814118341461029857806381f1b938146102ad57600080fd5b806366316d8d1461026257806379ba5097146102755780637d4807871461027d57600080fd5b8063181f5a7711610176578063181f5a77146101ba5780632a905ccc1461020c57806359b5b7ac1461022e57600080fd5b8063083a5466146101925780631112dadc146101a7575b600080fd5b6101a56101a03660046139fb565b61059c565b005b6101a56101b5366004613ba4565b6105f1565b6101f66040518060400160405280601c81526020017f46756e6374696f6e7320436f6f7264696e61746f722076312e312e300000000081525081565b6040516102039190613cc8565b60405180910390f35b610214610841565b60405168ffffffffffffffffff9091168152602001610203565b61021461023c366004613d69565b50600854700100000000000000000000000000000000900468ffffffffffffffffff1690565b6101a5610270366004613df8565b6108d7565b6101a5610a90565b6101a5610b92565b6101a56102933660046139fb565b610d92565b6102a0610de2565b6040516102039190613e82565b6101f6610e51565b6102ff60015460025463ffffffff74010000000000000000000000000000000000000000830481169378010000000000000000000000000000000000000000000000009093041691565b6040805163ffffffff948516815293909216602084015290820152606001610203565b6101a5610330366004613e95565b610f22565b60005460405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610203565b61037061036b366004613eae565b610fd4565b6040516102039190614003565b604080516001815260006020820181905291810191909152606001610203565b6101a56103ab366004614057565b611175565b61051b6040805161012081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e0810182905261010081019190915250604080516101208101825260085463ffffffff80821683526401000000008204811660208401526801000000000000000082048116938301939093526c01000000000000000000000000810483166060830152700100000000000000000000000000000000810468ffffffffffffffffff166080830152790100000000000000000000000000000000000000000000000000810464ffffffffff1660a08301527e01000000000000000000000000000000000000000000000000000000000000900461ffff1660c08201526009547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff811660e08301527c0100000000000000000000000000000000000000000000000000000000900490911661010082015290565b604051610203919061410e565b61053b6105363660046141fe565b611785565b6040516bffffffffffffffffffffffff9091168152602001610203565b6101f66118e5565b6101a561056e366004614317565b61193c565b61057b6124b8565b604051908152602001610203565b6101a56105973660046143e4565b612711565b6105a4612725565b60008190036105df576040517f4f42be3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600d6105ec82848361449a565b505050565b6105f96127a8565b80516008805460208401516040808601516060870151608088015160a089015160c08a015161ffff167e01000000000000000000000000000000000000000000000000000000000000027dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff64ffffffffff909216790100000000000000000000000000000000000000000000000000027fffff0000000000ffffffffffffffffffffffffffffffffffffffffffffffffff68ffffffffffffffffff90941670010000000000000000000000000000000002939093167fffff0000000000000000000000000000ffffffffffffffffffffffffffffffff63ffffffff9586166c01000000000000000000000000027fffffffffffffffffffffffffffffffff00000000ffffffffffffffffffffffff9787166801000000000000000002979097167fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff998716640100000000027fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000909b169c87169c909c1799909917979097169990991793909317959095169390931793909317929092169390931790915560e08301516101008401519092167c0100000000000000000000000000000000000000000000000000000000027bffffffffffffffffffffffffffffffffffffffffffffffffffffffff90921691909117600955517f5f32d06f5e83eda3a68e0e964ef2e6af5cb613e8117aa103c2d6bca5f51848629061083690839061410e565b60405180910390a150565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16632a905ccc6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156108ae573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108d291906145c0565b905090565b6108df6127b0565b806bffffffffffffffffffffffff166000036109195750336000908152600a60205260409020546bffffffffffffffffffffffff16610973565b336000908152600a60205260409020546bffffffffffffffffffffffff80831691161015610973576040517ff4d678b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336000908152600a6020526040812080548392906109a09084906bffffffffffffffffffffffff1661460c565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055506109f57f000000000000000000000000000000000000000000000000000000000000000090565b6040517f66316d8d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301526bffffffffffffffffffffffff8416602483015291909116906366316d8d90604401600060405180830381600087803b158015610a7457600080fd5b505af1158015610a88573d6000803e3d6000fd5b505050505050565b60015473ffffffffffffffffffffffffffffffffffffffff163314610b16576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064015b60405180910390fd5b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b610b9a6127a8565b610ba26127b0565b6000610bac610de2565b905060005b8151811015610d8e576000600a6000848481518110610bd257610bd2614631565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff168252810191909152604001600020546bffffffffffffffffffffffff1690508015610d7d576000600a6000858581518110610c3157610c31614631565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550610cc87f000000000000000000000000000000000000000000000000000000000000000090565b73ffffffffffffffffffffffffffffffffffffffff166366316d8d848481518110610cf557610cf5614631565b6020026020010151836040518363ffffffff1660e01b8152600401610d4a92919073ffffffffffffffffffffffffffffffffffffffff9290921682526bffffffffffffffffffffffff16602082015260400190565b600060405180830381600087803b158015610d6457600080fd5b505af1158015610d78573d6000803e3d6000fd5b505050505b50610d8781614660565b9050610bb1565b5050565b610d9a612725565b6000819003610dd5576040517f4f42be3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600c6105ec82848361449a565b60606006805480602002602001604051908101604052809291908181526020018280548015610e4757602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311610e1c575b5050505050905090565b6060600d8054610e6090614401565b9050600003610e9b576040517f4f42be3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600d8054610ea890614401565b80601f0160208091040260200160405190810160405280929190818152602001828054610ed490614401565b8015610e475780601f10610ef657610100808354040283529160200191610e47565b820191906000526020600020905b815481529060010190602001808311610f0457509395945050505050565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610f91576040517fc41a5b0900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008181526007602052604080822091909155517f8a4b97add3359bd6bcf5e82874363670eb5ad0f7615abddbd0ed0a3a98f0f416906108369083815260200190565b6040805161016081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810182905261012081018290526101408101919091523373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161461109c576040517fc41a5b0900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6110ad6110a883614698565b61295c565b90506110bf60608301604084016143e4565b815173ffffffffffffffffffffffffffffffffffffffff91909116907fbf50768ccf13bd0110ca6d53a9c4f1f3271abdd4c24a56878863ed25b20598ff3261110d60c0870160a08801614785565b61111f610160880161014089016143e4565b61112988806147a2565b61113b6101208b016101008c01614807565b60208b01356111516101008d0160e08e01614822565b8b6040516111679998979695949392919061483f565b60405180910390a35b919050565b60005a604080518b3580825262ffffff6020808f0135600881901c929092169084015293945092917fb04e63db38c49950639fa09d29872f21f5d49d614f3a969d8adf3d4b52e41a62910160405180910390a16111d68a8a8a8a8a8a612dfa565b6003546000906002906111f49060ff808216916101009004166148e7565b6111fe919061492f565b6112099060016148e7565b60ff169050878114611277576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f77726f6e67206e756d626572206f66207369676e6174757265730000000000006044820152606401610b0d565b878614611306576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f7265706f727420727320616e64207373206d757374206265206f66206571756160448201527f6c206c656e6774680000000000000000000000000000000000000000000000006064820152608401610b0d565b3360009081526004602090815260408083208151808301909252805460ff8082168452929391929184019161010090910416600281111561134957611349614951565b600281111561135a5761135a614951565b905250905060028160200151600281111561137757611377614951565b141580156113c057506006816000015160ff168154811061139a5761139a614631565b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff163314155b15611427576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f756e617574686f72697a6564207472616e736d697474657200000000000000006044820152606401610b0d565b50505050611433613993565b6000808a8a604051611446929190614980565b60405190819003812061145d918e90602001614990565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181528282528051602091820120838301909252600080845290830152915060005b898110156117675760006001848984602081106114c6576114c6614631565b6114d391901a601b6148e7565b8e8e868181106114e5576114e5614631565b905060200201358d8d878181106114fe576114fe614631565b905060200201356040516000815260200160405260405161153b949392919093845260ff9290921660208401526040830152606082015260800190565b6020604051602081039080840390855afa15801561155d573d6000803e3d6000fd5b5050604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081015173ffffffffffffffffffffffffffffffffffffffff811660009081526004602090815290849020838501909452835460ff808216855292965092945084019161010090041660028111156115dd576115dd614951565b60028111156115ee576115ee614951565b905250925060018360200151600281111561160b5761160b614951565b14611672576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f61646472657373206e6f7420617574686f72697a656420746f207369676e00006044820152606401610b0d565b8251600090879060ff16601f811061168c5761168c614631565b602002015173ffffffffffffffffffffffffffffffffffffffff161461170e576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f6e6f6e2d756e69717565207369676e61747572650000000000000000000000006044820152606401610b0d565b8086846000015160ff16601f811061172857611728614631565b73ffffffffffffffffffffffffffffffffffffffff90921660209290920201526117536001866148e7565b9450508061176090614660565b90506114a7565b505050611778833383858e8e612eb1565b5050505050505050505050565b60007f00000000000000000000000000000000000000000000000000000000000000006040517f10fc49c100000000000000000000000000000000000000000000000000000000815267ffffffffffffffff8816600482015263ffffffff8516602482015273ffffffffffffffffffffffffffffffffffffffff91909116906310fc49c19060440160006040518083038186803b15801561182557600080fd5b505afa158015611839573d6000803e3d6000fd5b5050505066038d7ea4c6800082111561187e576040517f8129bbcd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000611888610841565b905060006118cb87878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061023c92505050565b90506118d9858583856130b0565b98975050505050505050565b6060600c80546118f490614401565b905060000361192f576040517f4f42be3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600c8054610ea890614401565b855185518560ff16601f8311156119af576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f746f6f206d616e79207369676e657273000000000000000000000000000000006044820152606401610b0d565b80600003611a19576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f66206d75737420626520706f73697469766500000000000000000000000000006044820152606401610b0d565b818314611aa7576040517f89a61989000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f6f7261636c6520616464726573736573206f7574206f6620726567697374726160448201527f74696f6e000000000000000000000000000000000000000000000000000000006064820152608401610b0d565b611ab28160036149a4565b8311611b1a576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f6661756c74792d6f7261636c65206620746f6f206869676800000000000000006044820152606401610b0d565b611b22612725565b6040805160c0810182528a8152602081018a905260ff89169181018290526060810188905267ffffffffffffffff8716608082015260a0810186905290611b69908861321d565b60055415611d1e57600554600090611b83906001906149bb565b9050600060058281548110611b9a57611b9a614631565b60009182526020822001546006805473ffffffffffffffffffffffffffffffffffffffff90921693509084908110611bd457611bd4614631565b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff85811684526004909252604080842080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000090811690915592909116808452922080549091169055600580549192509080611c5457611c546149ce565b60008281526020902081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90810180547fffffffffffffffffffffffff00000000000000000000000000000000000000001690550190556006805480611cbd57611cbd6149ce565b60008281526020902081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90810180547fffffffffffffffffffffffff000000000000000000000000000000000000000016905501905550611b69915050565b60005b8151518110156122d557815180516000919083908110611d4357611d43614631565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1603611dc8576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f7369676e6572206d757374206e6f7420626520656d70747900000000000000006044820152606401610b0d565b600073ffffffffffffffffffffffffffffffffffffffff1682602001518281518110611df657611df6614631565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1603611e7b576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f7472616e736d6974746572206d757374206e6f7420626520656d7074790000006044820152606401610b0d565b60006004600084600001518481518110611e9757611e97614631565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff16825281019190915260400160002054610100900460ff166002811115611ee157611ee1614951565b14611f48576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f7265706561746564207369676e657220616464726573730000000000000000006044820152606401610b0d565b6040805180820190915260ff82168152600160208201528251805160049160009185908110611f7957611f79614631565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff168252818101929092526040016000208251815460ff9091167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0082168117835592840151919283917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000161761010083600281111561201a5761201a614951565b02179055506000915061202a9050565b600460008460200151848151811061204457612044614631565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff16825281019190915260400160002054610100900460ff16600281111561208e5761208e614951565b146120f5576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f7265706561746564207472616e736d69747465722061646472657373000000006044820152606401610b0d565b6040805180820190915260ff82168152602081016002815250600460008460200151848151811061212857612128614631565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff168252818101929092526040016000208251815460ff9091167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0082168117835592840151919283917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000016176101008360028111156121c9576121c9614951565b0217905550508251805160059250839081106121e7576121e7614631565b602090810291909101810151825460018101845560009384529282902090920180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909316929092179091558201518051600691908390811061226357612263614631565b60209081029190910181015182546001810184556000938452919092200180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909216919091179055806122cd81614660565b915050611d21565b506040810151600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660ff909216919091179055600180547fffffffff00000000ffffffffffffffffffffffffffffffffffffffffffffffff8116780100000000000000000000000000000000000000000000000063ffffffff438116820292909217808555920481169291829160149161238d918491740100000000000000000000000000000000000000009004166149fd565b92506101000a81548163ffffffff021916908363ffffffff1602179055506123ec4630600160149054906101000a900463ffffffff1663ffffffff16856000015186602001518760400151886060015189608001518a60a00151613236565b600281905582518051600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1661010060ff9093169290920291909117905560015460208501516040808701516060880151608089015160a08a015193517f1591690b8638f5fb2dbec82ac741805ac5da8b45dc5263f4875b0496fdce4e05986124a3988b9891977401000000000000000000000000000000000000000090920463ffffffff16969095919491939192614a1a565b60405180910390a15050505050505050505050565b604080516101208101825260085463ffffffff80821683526401000000008204811660208401526801000000000000000082048116838501526c0100000000000000000000000080830482166060850152700100000000000000000000000000000000830468ffffffffffffffffff166080850152790100000000000000000000000000000000000000000000000000830464ffffffffff1660a0808601919091527e0100000000000000000000000000000000000000000000000000000000000090930461ffff1660c08501526009547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff811660e08601527c01000000000000000000000000000000000000000000000000000000009004909116610100840152600b5484517ffeaf968c00000000000000000000000000000000000000000000000000000000815294516000958694859490930473ffffffffffffffffffffffffffffffffffffffff169263feaf968c926004808401938290030181865afa158015612646573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061266a9190614aca565b50935050925050804261267d91906149bb565b836020015163ffffffff1610801561269f57506000836020015163ffffffff16115b156126cd57505060e001517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16919050565b6000821361270a576040517f43d4cf6600000000000000000000000000000000000000000000000000000000815260048101839052602401610b0d565b5092915050565b612719612725565b612722816132e1565b50565b60005473ffffffffffffffffffffffffffffffffffffffff1633146127a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401610b0d565b565b6127a6612725565b600b546bffffffffffffffffffffffff166000036127ca57565b60006127d4610de2565b80519091506000819003612814576040517f30274b3a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600b546000906128339083906bffffffffffffffffffffffff16614b1a565b905060005b828110156128fe5781600a600086848151811061285757612857614631565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282829054906101000a90046bffffffffffffffffffffffff166128bf9190614b45565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550806128f790614660565b9050612838565b506129098282614b6a565b600b80546000906129299084906bffffffffffffffffffffffff1661460c565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550505050565b6040805161016081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e0810182905261010081018290526101208101829052610140810191909152604080516101208101825260085463ffffffff80821683526401000000008204811660208401526801000000000000000082048116938301939093526c0100000000000000000000000081048316606083015268ffffffffffffffffff700100000000000000000000000000000000820416608083015264ffffffffff79010000000000000000000000000000000000000000000000000082041660a083015261ffff7e01000000000000000000000000000000000000000000000000000000000000909104811660c083018190526009547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff811660e08501527c0100000000000000000000000000000000000000000000000000000000900490931661010080840191909152850151919291161115612b17576040517fdada758700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600854600090700100000000000000000000000000000000900468ffffffffffffffffff1690506000612b548560e001513a8488608001516130b0565b9050806bffffffffffffffffffffffff1685606001516bffffffffffffffffffffffff161015612bb0576040517ff4d678b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600083610100015163ffffffff1642612bc99190614b92565b905060003087604001518860a001518960c001516001612be99190614ba5565b8a5180516020918201206101008d015160e08e0151604051612c9d98979695948c918c9132910173ffffffffffffffffffffffffffffffffffffffff9a8b168152988a1660208a015267ffffffffffffffff97881660408a0152959096166060880152608087019390935261ffff9190911660a086015263ffffffff90811660c08601526bffffffffffffffffffffffff9190911660e0850152919091166101008301529091166101208201526101400190565b6040516020818303038152906040528051906020012090506040518061016001604052808281526020013073ffffffffffffffffffffffffffffffffffffffff168152602001846bffffffffffffffffffffffff168152602001886040015173ffffffffffffffffffffffffffffffffffffffff1681526020018860a0015167ffffffffffffffff1681526020018860e0015163ffffffff168152602001886080015168ffffffffffffffffff1681526020018568ffffffffffffffffff168152602001866040015163ffffffff1664ffffffffff168152602001866060015163ffffffff1664ffffffffff1681526020018363ffffffff16815250955085604051602001612dac9190614003565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152918152815160209283012060009384526007909252909120555092949350505050565b6000612e078260206149a4565b612e128560206149a4565b612e1e88610144614b92565b612e289190614b92565b612e329190614b92565b612e3d906000614b92565b9050368114612ea8576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f63616c6c64617461206c656e677468206d69736d6174636800000000000000006044820152606401610b0d565b50505050505050565b600080808080612ec386880188614ca1565b84519499509297509095509350915060ff16801580612ee3575084518114155b80612eef575083518114155b80612efb575082518114155b80612f07575081518114155b15612f6e576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f4669656c6473206d75737420626520657175616c206c656e67746800000000006044820152606401610b0d565b60005b818110156130a1576000613006888381518110612f9057612f90614631565b6020026020010151888481518110612faa57612faa614631565b6020026020010151888581518110612fc457612fc4614631565b6020026020010151888681518110612fde57612fde614631565b6020026020010151888781518110612ff857612ff8614631565b6020026020010151886133d6565b9050600081600681111561301c5761301c614951565b14806130395750600181600681111561303757613037614951565b145b156130905787828151811061305057613050614631565b60209081029190910181015160405133815290917fc708e0440951fd63499c0f7a73819b469ee5dd3ecc356c0ab4eb7f18389009d9910160405180910390a25b5061309a81614660565b9050612f71565b50505050505050505050505050565b600854600090790100000000000000000000000000000000000000000000000000900464ffffffffff1684101561310b57600854790100000000000000000000000000000000000000000000000000900464ffffffffff1693505b600854600090612710906131259063ffffffff16876149a4565b61312f9190614d73565b6131399086614b92565b60085490915060009087906131729063ffffffff6c010000000000000000000000008204811691680100000000000000009004166149fd565b61317c91906149fd565b63ffffffff16905060006131c66000368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061371192505050565b905060006131e7826131d885876149a4565b6131e29190614b92565b613853565b9050600061320368ffffffffffffffffff808916908a16614b45565b905061320f8183614b45565b9a9950505050505050505050565b6000613227610de2565b511115610d8e57610d8e6127b0565b6000808a8a8a8a8a8a8a8a8a60405160200161325a99989796959493929190614d87565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291905280516020909101207dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e01000000000000000000000000000000000000000000000000000000000000179150509998505050505050505050565b3373ffffffffffffffffffffffffffffffffffffffff821603613360576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401610b0d565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b600080848060200190518101906133ed9190614e53565b905060003a8261012001518361010001516134089190614f1b565b64ffffffffff1661341991906149a4565b905060008460ff166134616000368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061371192505050565b61346b9190614d73565b9050600061347c6131e28385614b92565b905060006134893a613853565b90506000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663330605298e8e868b60e0015168ffffffffffffffffff16896134e89190614b45565b338d6040518763ffffffff1660e01b815260040161350b96959493929190614f39565b60408051808303816000875af1158015613529573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061354d9190614fb5565b9092509050600082600681111561356657613566614951565b14806135835750600182600681111561358157613581614951565b145b156137005760008e8152600760205260408120556135a18185614b45565b336000908152600a6020526040812080549091906135ce9084906bffffffffffffffffffffffff16614b45565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055508660e0015168ffffffffffffffffff16600b60008282829054906101000a90046bffffffffffffffffffffffff166136349190614b45565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055508d7f90815c2e624694e8010bffad2bcefaf96af282ef1bc2ebc0042d1b89a585e0468487848b60c0015168ffffffffffffffffff168c60e0015168ffffffffffffffffff16878b6136b39190614b45565b6136bd9190614b45565b6136c79190614b45565b604080516bffffffffffffffffffffffff9586168152602081019490945291841683830152909216606082015290519081900360800190a25b509c9b505050505050505050505050565b60004661371d81613887565b1561379957606c73ffffffffffffffffffffffffffffffffffffffff1663c6f7de0e6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561376e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906137929190614fe8565b9392505050565b6137a2816138aa565b1561384a5773420000000000000000000000000000000000000f73ffffffffffffffffffffffffffffffffffffffff166349948e0e8460405180608001604052806048815260200161503160489139604051602001613802929190615001565b6040516020818303038152906040526040518263ffffffff1660e01b815260040161382d9190613cc8565b602060405180830381865afa15801561376e573d6000803e3d6000fd5b50600092915050565b60006138816138606124b8565b61387284670de0b6b3a76400006149a4565b61387c9190614d73565b6138f1565b92915050565b600061a4b182148061389b575062066eed82145b8061388157505062066eee1490565b6000600a8214806138bc57506101a482145b806138c9575062aa37dc82145b806138d5575061210582145b806138e2575062014a3382145b8061388157505062014a341490565b60006bffffffffffffffffffffffff82111561398f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203960448201527f36206269747300000000000000000000000000000000000000000000000000006064820152608401610b0d565b5090565b604051806103e00160405280601f906020820280368337509192915050565b60008083601f8401126139c457600080fd5b50813567ffffffffffffffff8111156139dc57600080fd5b6020830191508360208285010111156139f457600080fd5b9250929050565b60008060208385031215613a0e57600080fd5b823567ffffffffffffffff811115613a2557600080fd5b613a31858286016139b2565b90969095509350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051610120810167ffffffffffffffff81118282101715613a9057613a90613a3d565b60405290565b604051610160810167ffffffffffffffff81118282101715613a9057613a90613a3d565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715613b0157613b01613a3d565b604052919050565b63ffffffff8116811461272257600080fd5b803561117081613b09565b68ffffffffffffffffff8116811461272257600080fd5b803561117081613b26565b64ffffffffff8116811461272257600080fd5b803561117081613b48565b803561ffff8116811461117057600080fd5b80357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8116811461117057600080fd5b60006101208284031215613bb757600080fd5b613bbf613a6c565b613bc883613b1b565b8152613bd660208401613b1b565b6020820152613be760408401613b1b565b6040820152613bf860608401613b1b565b6060820152613c0960808401613b3d565b6080820152613c1a60a08401613b5b565b60a0820152613c2b60c08401613b66565b60c0820152613c3c60e08401613b78565b60e0820152610100613c4f818501613b1b565b908201529392505050565b60005b83811015613c75578181015183820152602001613c5d565b50506000910152565b60008151808452613c96816020860160208601613c5a565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006137926020830184613c7e565b600082601f830112613cec57600080fd5b813567ffffffffffffffff811115613d0657613d06613a3d565b613d3760207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601613aba565b818152846020838601011115613d4c57600080fd5b816020850160208301376000918101602001919091529392505050565b600060208284031215613d7b57600080fd5b813567ffffffffffffffff811115613d9257600080fd5b613d9e84828501613cdb565b949350505050565b73ffffffffffffffffffffffffffffffffffffffff8116811461272257600080fd5b803561117081613da6565b6bffffffffffffffffffffffff8116811461272257600080fd5b803561117081613dd3565b60008060408385031215613e0b57600080fd5b8235613e1681613da6565b91506020830135613e2681613dd3565b809150509250929050565b600081518084526020808501945080840160005b83811015613e7757815173ffffffffffffffffffffffffffffffffffffffff1687529582019590820190600101613e45565b509495945050505050565b6020815260006137926020830184613e31565b600060208284031215613ea757600080fd5b5035919050565b600060208284031215613ec057600080fd5b813567ffffffffffffffff811115613ed757600080fd5b8201610160818503121561379257600080fd5b805182526020810151613f15602084018273ffffffffffffffffffffffffffffffffffffffff169052565b506040810151613f3560408401826bffffffffffffffffffffffff169052565b506060810151613f5d606084018273ffffffffffffffffffffffffffffffffffffffff169052565b506080810151613f79608084018267ffffffffffffffff169052565b5060a0810151613f9160a084018263ffffffff169052565b5060c0810151613fae60c084018268ffffffffffffffffff169052565b5060e0810151613fcb60e084018268ffffffffffffffffff169052565b506101008181015164ffffffffff9081169184019190915261012080830151909116908301526101409081015163ffffffff16910152565b61016081016138818284613eea565b60008083601f84011261402457600080fd5b50813567ffffffffffffffff81111561403c57600080fd5b6020830191508360208260051b85010111156139f457600080fd5b60008060008060008060008060e0898b03121561407357600080fd5b606089018a81111561408457600080fd5b8998503567ffffffffffffffff8082111561409e57600080fd5b6140aa8c838d016139b2565b909950975060808b01359150808211156140c357600080fd5b6140cf8c838d01614012565b909750955060a08b01359150808211156140e857600080fd5b506140f58b828c01614012565b999c989b50969995989497949560c00135949350505050565b815163ffffffff908116825260208084015182169083015260408084015182169083015260608084015191821690830152610120820190506080830151614162608084018268ffffffffffffffffff169052565b5060a083015161417b60a084018264ffffffffff169052565b5060c083015161419160c084018261ffff169052565b5060e08301516141c160e08401827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff169052565b506101008381015163ffffffff8116848301525b505092915050565b67ffffffffffffffff8116811461272257600080fd5b8035611170816141dd565b60008060008060006080868803121561421657600080fd5b8535614221816141dd565b9450602086013567ffffffffffffffff81111561423d57600080fd5b614249888289016139b2565b909550935050604086013561425d81613b09565b949793965091946060013592915050565b600067ffffffffffffffff82111561428857614288613a3d565b5060051b60200190565b600082601f8301126142a357600080fd5b813560206142b86142b38361426e565b613aba565b82815260059290921b840181019181810190868411156142d757600080fd5b8286015b848110156142fb5780356142ee81613da6565b83529183019183016142db565b509695505050505050565b803560ff8116811461117057600080fd5b60008060008060008060c0878903121561433057600080fd5b863567ffffffffffffffff8082111561434857600080fd5b6143548a838b01614292565b9750602089013591508082111561436a57600080fd5b6143768a838b01614292565b965061438460408a01614306565b9550606089013591508082111561439a57600080fd5b6143a68a838b01613cdb565b94506143b460808a016141f3565b935060a08901359150808211156143ca57600080fd5b506143d789828a01613cdb565b9150509295509295509295565b6000602082840312156143f657600080fd5b813561379281613da6565b600181811c9082168061441557607f821691505b60208210810361444e577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b601f8211156105ec57600081815260208120601f850160051c8101602086101561447b5750805b601f850160051c820191505b81811015610a8857828155600101614487565b67ffffffffffffffff8311156144b2576144b2613a3d565b6144c6836144c08354614401565b83614454565b6000601f84116001811461451857600085156144e25750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b1783556145ae565b6000838152602090207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0861690835b828110156145675786850135825560209485019460019092019101614547565b50868210156145a2577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b805161117081613b26565b6000602082840312156145d257600080fd5b815161379281613b26565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6bffffffffffffffffffffffff82811682821603908082111561270a5761270a6145dd565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203614691576146916145dd565b5060010190565b600061016082360312156146ab57600080fd5b6146b3613a96565b823567ffffffffffffffff8111156146ca57600080fd5b6146d636828601613cdb565b825250602083013560208201526146ef60408401613dc8565b604082015261470060608401613ded565b606082015261471160808401613b3d565b608082015261472260a084016141f3565b60a082015261473360c084016141f3565b60c082015261474460e08401613b1b565b60e0820152610100614757818501613b66565b908201526101206147698482016141f3565b9082015261014061477b848201613dc8565b9082015292915050565b60006020828403121561479757600080fd5b8135613792816141dd565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18436030181126147d757600080fd5b83018035915067ffffffffffffffff8211156147f257600080fd5b6020019150368190038213156139f457600080fd5b60006020828403121561481957600080fd5b61379282613b66565b60006020828403121561483457600080fd5b813561379281613b09565b73ffffffffffffffffffffffffffffffffffffffff8a8116825267ffffffffffffffff8a166020830152881660408201526102406060820181905281018690526000610260878982850137600083890182015261ffff8716608084015260a0830186905263ffffffff851660c0840152601f88017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016830101905061320f60e0830184613eea565b60ff8181168382160190811115613881576138816145dd565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600060ff83168061494257614942614900565b8060ff84160491505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b8183823760009101908152919050565b828152606082602083013760800192915050565b8082028115828204841417613881576138816145dd565b81810381811115613881576138816145dd565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b63ffffffff81811683821601908082111561270a5761270a6145dd565b600061012063ffffffff808d1684528b6020850152808b16604085015250806060840152614a4a8184018a613e31565b90508281036080840152614a5e8189613e31565b905060ff871660a084015282810360c0840152614a7b8187613c7e565b905067ffffffffffffffff851660e0840152828103610100840152614aa08185613c7e565b9c9b505050505050505050505050565b805169ffffffffffffffffffff8116811461117057600080fd5b600080600080600060a08688031215614ae257600080fd5b614aeb86614ab0565b9450602086015193506040860151925060608601519150614b0e60808701614ab0565b90509295509295909350565b60006bffffffffffffffffffffffff80841680614b3957614b39614900565b92169190910492915050565b6bffffffffffffffffffffffff81811683821601908082111561270a5761270a6145dd565b6bffffffffffffffffffffffff8181168382160280821691908281146141d5576141d56145dd565b80820180821115613881576138816145dd565b67ffffffffffffffff81811683821601908082111561270a5761270a6145dd565b600082601f830112614bd757600080fd5b81356020614be76142b38361426e565b82815260059290921b84018101918181019086841115614c0657600080fd5b8286015b848110156142fb5780358352918301918301614c0a565b600082601f830112614c3257600080fd5b81356020614c426142b38361426e565b82815260059290921b84018101918181019086841115614c6157600080fd5b8286015b848110156142fb57803567ffffffffffffffff811115614c855760008081fd5b614c938986838b0101613cdb565b845250918301918301614c65565b600080600080600060a08688031215614cb957600080fd5b853567ffffffffffffffff80821115614cd157600080fd5b614cdd89838a01614bc6565b96506020880135915080821115614cf357600080fd5b614cff89838a01614c21565b95506040880135915080821115614d1557600080fd5b614d2189838a01614c21565b94506060880135915080821115614d3757600080fd5b614d4389838a01614c21565b93506080880135915080821115614d5957600080fd5b50614d6688828901614c21565b9150509295509295909350565b600082614d8257614d82614900565b500490565b60006101208b835273ffffffffffffffffffffffffffffffffffffffff8b16602084015267ffffffffffffffff808b166040850152816060850152614dce8285018b613e31565b91508382036080850152614de2828a613e31565b915060ff881660a085015283820360c0850152614dff8288613c7e565b90861660e08501528381036101008501529050614aa08185613c7e565b805161117081613da6565b805161117081613dd3565b8051611170816141dd565b805161117081613b09565b805161117081613b48565b60006101608284031215614e6657600080fd5b614e6e613a96565b82518152614e7e60208401614e1c565b6020820152614e8f60408401614e27565b6040820152614ea060608401614e1c565b6060820152614eb160808401614e32565b6080820152614ec260a08401614e3d565b60a0820152614ed360c084016145b5565b60c0820152614ee460e084016145b5565b60e0820152610100614ef7818501614e48565b90820152610120614f09848201614e48565b90820152610140613c4f848201614e3d565b64ffffffffff81811683821601908082111561270a5761270a6145dd565b6000610200808352614f4d8184018a613c7e565b90508281036020840152614f618189613c7e565b6bffffffffffffffffffffffff88811660408601528716606085015273ffffffffffffffffffffffffffffffffffffffff861660808501529150614faa905060a0830184613eea565b979650505050505050565b60008060408385031215614fc857600080fd5b825160078110614fd757600080fd5b6020840151909250613e2681613dd3565b600060208284031215614ffa57600080fd5b5051919050565b60008351615013818460208801613c5a565b835190830190615027818360208801613c5a565b0194935050505056fe307866666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666a164736f6c6343000813000a", + Bin: "0x60a06040523480156200001157600080fd5b50604051620056d0380380620056d083398101604081905262000034916200046d565b8282828233806000816200008f5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000c257620000c28162000139565b5050506001600160a01b038116620000ed57604051632530e88560e11b815260040160405180910390fd5b6001600160a01b03908116608052600b80549183166c01000000000000000000000000026001600160601b039092169190911790556200012d82620001e4565b5050505050506200062c565b336001600160a01b03821603620001935760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000086565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b620001ee62000342565b80516008805460208401516040808601516060870151608088015160a089015160c08a015161ffff16600160f01b026001600160f01b0364ffffffffff909216600160c81b0264ffffffffff60c81b196001600160481b03909416600160801b0293909316600160801b600160f01b031963ffffffff9586166c010000000000000000000000000263ffffffff60601b19978716680100000000000000000297909716600160401b600160801b0319998716640100000000026001600160401b0319909b169c87169c909c1799909917979097169990991793909317959095169390931793909317929092169390931790915560e0830151610100840151909216600160e01b026001600160e01b0390921691909117600955517f5f32d06f5e83eda3a68e0e964ef2e6af5cb613e8117aa103c2d6bca5f5184862906200033790839062000576565b60405180910390a150565b6200034c6200034e565b565b6000546001600160a01b031633146200034c5760405162461bcd60e51b815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000604482015260640162000086565b80516001600160a01b0381168114620003c257600080fd5b919050565b60405161012081016001600160401b0381118282101715620003f957634e487b7160e01b600052604160045260246000fd5b60405290565b805163ffffffff81168114620003c257600080fd5b80516001600160481b0381168114620003c257600080fd5b805164ffffffffff81168114620003c257600080fd5b805161ffff81168114620003c257600080fd5b80516001600160e01b0381168114620003c257600080fd5b60008060008385036101608112156200048557600080fd5b6200049085620003aa565b935061012080601f1983011215620004a757600080fd5b620004b1620003c7565b9150620004c160208701620003ff565b8252620004d160408701620003ff565b6020830152620004e460608701620003ff565b6040830152620004f760808701620003ff565b60608301526200050a60a0870162000414565b60808301526200051d60c087016200042c565b60a08301526200053060e0870162000442565b60c08301526101006200054581880162000455565b60e084015262000557828801620003ff565b908301525091506200056d6101408501620003aa565b90509250925092565b815163ffffffff908116825260208084015182169083015260408084015182169083015260608084015191821690830152610120820190506080830151620005c960808401826001600160481b03169052565b5060a0830151620005e360a084018264ffffffffff169052565b5060c0830151620005fa60c084018261ffff169052565b5060e08301516200061660e08401826001600160e01b03169052565b506101009283015163ffffffff16919092015290565b60805161505e6200067260003960008181610845015281816109d301528181610ca601528181610f3a01528181611045015281816117890152613490015261505e6000f3fe608060405234801561001057600080fd5b506004361061018d5760003560e01c806381ff7048116100e3578063c3f909d41161008c578063e3d0e71211610066578063e3d0e71214610560578063e4ddcea614610573578063f2fde38b1461058957600080fd5b8063c3f909d4146103b0578063d227d24514610528578063d328a91e1461055857600080fd5b8063a631571e116100bd578063a631571e1461035d578063afcb95d71461037d578063b1dc65a41461039d57600080fd5b806381ff7048146102b557806385b214cf146103225780638da5cb5b1461033557600080fd5b806366316d8d116101455780637f15e1661161011f5780637f15e16614610285578063814118341461029857806381f1b938146102ad57600080fd5b806366316d8d1461026257806379ba5097146102755780637d4807871461027d57600080fd5b8063181f5a7711610176578063181f5a77146101ba5780632a905ccc1461020c57806359b5b7ac1461022e57600080fd5b8063083a5466146101925780631112dadc146101a7575b600080fd5b6101a56101a03660046139d4565b61059c565b005b6101a56101b5366004613b7d565b6105f1565b6101f66040518060400160405280601c81526020017f46756e6374696f6e7320436f6f7264696e61746f722076312e312e300000000081525081565b6040516102039190613ca1565b60405180910390f35b610214610841565b60405168ffffffffffffffffff9091168152602001610203565b61021461023c366004613d42565b50600854700100000000000000000000000000000000900468ffffffffffffffffff1690565b6101a5610270366004613dd1565b6108d7565b6101a5610a90565b6101a5610b92565b6101a56102933660046139d4565b610d92565b6102a0610de2565b6040516102039190613e5b565b6101f6610e51565b6102ff60015460025463ffffffff74010000000000000000000000000000000000000000830481169378010000000000000000000000000000000000000000000000009093041691565b6040805163ffffffff948516815293909216602084015290820152606001610203565b6101a5610330366004613e6e565b610f22565b60005460405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610203565b61037061036b366004613e87565b610fd4565b6040516102039190613fdc565b604080516001815260006020820181905291810191909152606001610203565b6101a56103ab366004614030565b611175565b61051b6040805161012081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e0810182905261010081019190915250604080516101208101825260085463ffffffff80821683526401000000008204811660208401526801000000000000000082048116938301939093526c01000000000000000000000000810483166060830152700100000000000000000000000000000000810468ffffffffffffffffff166080830152790100000000000000000000000000000000000000000000000000810464ffffffffff1660a08301527e01000000000000000000000000000000000000000000000000000000000000900461ffff1660c08201526009547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff811660e08301527c0100000000000000000000000000000000000000000000000000000000900490911661010082015290565b60405161020391906140e7565b61053b6105363660046141d7565b611785565b6040516bffffffffffffffffffffffff9091168152602001610203565b6101f66118e5565b6101a561056e3660046142f0565b61193c565b61057b6124b8565b604051908152602001610203565b6101a56105973660046143bd565b612711565b6105a4612725565b60008190036105df576040517f4f42be3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600d6105ec828483614473565b505050565b6105f96127a8565b80516008805460208401516040808601516060870151608088015160a089015160c08a015161ffff167e01000000000000000000000000000000000000000000000000000000000000027dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff64ffffffffff909216790100000000000000000000000000000000000000000000000000027fffff0000000000ffffffffffffffffffffffffffffffffffffffffffffffffff68ffffffffffffffffff90941670010000000000000000000000000000000002939093167fffff0000000000000000000000000000ffffffffffffffffffffffffffffffff63ffffffff9586166c01000000000000000000000000027fffffffffffffffffffffffffffffffff00000000ffffffffffffffffffffffff9787166801000000000000000002979097167fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff998716640100000000027fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000909b169c87169c909c1799909917979097169990991793909317959095169390931793909317929092169390931790915560e08301516101008401519092167c0100000000000000000000000000000000000000000000000000000000027bffffffffffffffffffffffffffffffffffffffffffffffffffffffff90921691909117600955517f5f32d06f5e83eda3a68e0e964ef2e6af5cb613e8117aa103c2d6bca5f5184862906108369083906140e7565b60405180910390a150565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16632a905ccc6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156108ae573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108d29190614599565b905090565b6108df6127b0565b806bffffffffffffffffffffffff166000036109195750336000908152600a60205260409020546bffffffffffffffffffffffff16610973565b336000908152600a60205260409020546bffffffffffffffffffffffff80831691161015610973576040517ff4d678b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336000908152600a6020526040812080548392906109a09084906bffffffffffffffffffffffff166145e5565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055506109f57f000000000000000000000000000000000000000000000000000000000000000090565b6040517f66316d8d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301526bffffffffffffffffffffffff8416602483015291909116906366316d8d90604401600060405180830381600087803b158015610a7457600080fd5b505af1158015610a88573d6000803e3d6000fd5b505050505050565b60015473ffffffffffffffffffffffffffffffffffffffff163314610b16576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064015b60405180910390fd5b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b610b9a6127a8565b610ba26127b0565b6000610bac610de2565b905060005b8151811015610d8e576000600a6000848481518110610bd257610bd261460a565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff168252810191909152604001600020546bffffffffffffffffffffffff1690508015610d7d576000600a6000858581518110610c3157610c3161460a565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550610cc87f000000000000000000000000000000000000000000000000000000000000000090565b73ffffffffffffffffffffffffffffffffffffffff166366316d8d848481518110610cf557610cf561460a565b6020026020010151836040518363ffffffff1660e01b8152600401610d4a92919073ffffffffffffffffffffffffffffffffffffffff9290921682526bffffffffffffffffffffffff16602082015260400190565b600060405180830381600087803b158015610d6457600080fd5b505af1158015610d78573d6000803e3d6000fd5b505050505b50610d8781614639565b9050610bb1565b5050565b610d9a612725565b6000819003610dd5576040517f4f42be3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600c6105ec828483614473565b60606006805480602002602001604051908101604052809291908181526020018280548015610e4757602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311610e1c575b5050505050905090565b6060600d8054610e60906143da565b9050600003610e9b576040517f4f42be3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600d8054610ea8906143da565b80601f0160208091040260200160405190810160405280929190818152602001828054610ed4906143da565b8015610e475780601f10610ef657610100808354040283529160200191610e47565b820191906000526020600020905b815481529060010190602001808311610f0457509395945050505050565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610f91576040517fc41a5b0900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008181526007602052604080822091909155517f8a4b97add3359bd6bcf5e82874363670eb5ad0f7615abddbd0ed0a3a98f0f416906108369083815260200190565b6040805161016081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810182905261012081018290526101408101919091523373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161461109c576040517fc41a5b0900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6110ad6110a883614671565b61295c565b90506110bf60608301604084016143bd565b815173ffffffffffffffffffffffffffffffffffffffff91909116907fbf50768ccf13bd0110ca6d53a9c4f1f3271abdd4c24a56878863ed25b20598ff3261110d60c0870160a0880161475e565b61111f610160880161014089016143bd565b611129888061477b565b61113b6101208b016101008c016147e0565b60208b01356111516101008d0160e08e016147fb565b8b60405161116799989796959493929190614818565b60405180910390a35b919050565b60005a604080518b3580825262ffffff6020808f0135600881901c929092169084015293945092917fb04e63db38c49950639fa09d29872f21f5d49d614f3a969d8adf3d4b52e41a62910160405180910390a16111d68a8a8a8a8a8a612dfa565b6003546000906002906111f49060ff808216916101009004166148c0565b6111fe9190614908565b6112099060016148c0565b60ff169050878114611277576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f77726f6e67206e756d626572206f66207369676e6174757265730000000000006044820152606401610b0d565b878614611306576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f7265706f727420727320616e64207373206d757374206265206f66206571756160448201527f6c206c656e6774680000000000000000000000000000000000000000000000006064820152608401610b0d565b3360009081526004602090815260408083208151808301909252805460ff808216845292939192918401916101009091041660028111156113495761134961492a565b600281111561135a5761135a61492a565b90525090506002816020015160028111156113775761137761492a565b141580156113c057506006816000015160ff168154811061139a5761139a61460a565b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff163314155b15611427576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f756e617574686f72697a6564207472616e736d697474657200000000000000006044820152606401610b0d565b5050505061143361396c565b6000808a8a604051611446929190614959565b60405190819003812061145d918e90602001614969565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181528282528051602091820120838301909252600080845290830152915060005b898110156117675760006001848984602081106114c6576114c661460a565b6114d391901a601b6148c0565b8e8e868181106114e5576114e561460a565b905060200201358d8d878181106114fe576114fe61460a565b905060200201356040516000815260200160405260405161153b949392919093845260ff9290921660208401526040830152606082015260800190565b6020604051602081039080840390855afa15801561155d573d6000803e3d6000fd5b5050604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081015173ffffffffffffffffffffffffffffffffffffffff811660009081526004602090815290849020838501909452835460ff808216855292965092945084019161010090041660028111156115dd576115dd61492a565b60028111156115ee576115ee61492a565b905250925060018360200151600281111561160b5761160b61492a565b14611672576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f61646472657373206e6f7420617574686f72697a656420746f207369676e00006044820152606401610b0d565b8251600090879060ff16601f811061168c5761168c61460a565b602002015173ffffffffffffffffffffffffffffffffffffffff161461170e576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f6e6f6e2d756e69717565207369676e61747572650000000000000000000000006044820152606401610b0d565b8086846000015160ff16601f81106117285761172861460a565b73ffffffffffffffffffffffffffffffffffffffff90921660209290920201526117536001866148c0565b9450508061176090614639565b90506114a7565b505050611778833383858e8e612eb1565b5050505050505050505050565b60007f00000000000000000000000000000000000000000000000000000000000000006040517f10fc49c100000000000000000000000000000000000000000000000000000000815267ffffffffffffffff8816600482015263ffffffff8516602482015273ffffffffffffffffffffffffffffffffffffffff91909116906310fc49c19060440160006040518083038186803b15801561182557600080fd5b505afa158015611839573d6000803e3d6000fd5b5050505066038d7ea4c6800082111561187e576040517f8129bbcd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000611888610841565b905060006118cb87878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061023c92505050565b90506118d9858583856130b0565b98975050505050505050565b6060600c80546118f4906143da565b905060000361192f576040517f4f42be3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600c8054610ea8906143da565b855185518560ff16601f8311156119af576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f746f6f206d616e79207369676e657273000000000000000000000000000000006044820152606401610b0d565b80600003611a19576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f66206d75737420626520706f73697469766500000000000000000000000000006044820152606401610b0d565b818314611aa7576040517f89a61989000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f6f7261636c6520616464726573736573206f7574206f6620726567697374726160448201527f74696f6e000000000000000000000000000000000000000000000000000000006064820152608401610b0d565b611ab281600361497d565b8311611b1a576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f6661756c74792d6f7261636c65206620746f6f206869676800000000000000006044820152606401610b0d565b611b22612725565b6040805160c0810182528a8152602081018a905260ff89169181018290526060810188905267ffffffffffffffff8716608082015260a0810186905290611b69908861321d565b60055415611d1e57600554600090611b8390600190614994565b9050600060058281548110611b9a57611b9a61460a565b60009182526020822001546006805473ffffffffffffffffffffffffffffffffffffffff90921693509084908110611bd457611bd461460a565b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff85811684526004909252604080842080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000090811690915592909116808452922080549091169055600580549192509080611c5457611c546149a7565b60008281526020902081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90810180547fffffffffffffffffffffffff00000000000000000000000000000000000000001690550190556006805480611cbd57611cbd6149a7565b60008281526020902081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90810180547fffffffffffffffffffffffff000000000000000000000000000000000000000016905501905550611b69915050565b60005b8151518110156122d557815180516000919083908110611d4357611d4361460a565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1603611dc8576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f7369676e6572206d757374206e6f7420626520656d70747900000000000000006044820152606401610b0d565b600073ffffffffffffffffffffffffffffffffffffffff1682602001518281518110611df657611df661460a565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1603611e7b576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f7472616e736d6974746572206d757374206e6f7420626520656d7074790000006044820152606401610b0d565b60006004600084600001518481518110611e9757611e9761460a565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff16825281019190915260400160002054610100900460ff166002811115611ee157611ee161492a565b14611f48576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f7265706561746564207369676e657220616464726573730000000000000000006044820152606401610b0d565b6040805180820190915260ff82168152600160208201528251805160049160009185908110611f7957611f7961460a565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff168252818101929092526040016000208251815460ff9091167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0082168117835592840151919283917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000161761010083600281111561201a5761201a61492a565b02179055506000915061202a9050565b60046000846020015184815181106120445761204461460a565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff16825281019190915260400160002054610100900460ff16600281111561208e5761208e61492a565b146120f5576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f7265706561746564207472616e736d69747465722061646472657373000000006044820152606401610b0d565b6040805180820190915260ff8216815260208101600281525060046000846020015184815181106121285761212861460a565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff168252818101929092526040016000208251815460ff9091167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0082168117835592840151919283917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000016176101008360028111156121c9576121c961492a565b0217905550508251805160059250839081106121e7576121e761460a565b602090810291909101810151825460018101845560009384529282902090920180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff90931692909217909155820151805160069190839081106122635761226361460a565b60209081029190910181015182546001810184556000938452919092200180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909216919091179055806122cd81614639565b915050611d21565b506040810151600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660ff909216919091179055600180547fffffffff00000000ffffffffffffffffffffffffffffffffffffffffffffffff8116780100000000000000000000000000000000000000000000000063ffffffff438116820292909217808555920481169291829160149161238d918491740100000000000000000000000000000000000000009004166149d6565b92506101000a81548163ffffffff021916908363ffffffff1602179055506123ec4630600160149054906101000a900463ffffffff1663ffffffff16856000015186602001518760400151886060015189608001518a60a00151613236565b600281905582518051600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1661010060ff9093169290920291909117905560015460208501516040808701516060880151608089015160a08a015193517f1591690b8638f5fb2dbec82ac741805ac5da8b45dc5263f4875b0496fdce4e05986124a3988b9891977401000000000000000000000000000000000000000090920463ffffffff169690959194919391926149f3565b60405180910390a15050505050505050505050565b604080516101208101825260085463ffffffff80821683526401000000008204811660208401526801000000000000000082048116838501526c0100000000000000000000000080830482166060850152700100000000000000000000000000000000830468ffffffffffffffffff166080850152790100000000000000000000000000000000000000000000000000830464ffffffffff1660a0808601919091527e0100000000000000000000000000000000000000000000000000000000000090930461ffff1660c08501526009547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff811660e08601527c01000000000000000000000000000000000000000000000000000000009004909116610100840152600b5484517ffeaf968c00000000000000000000000000000000000000000000000000000000815294516000958694859490930473ffffffffffffffffffffffffffffffffffffffff169263feaf968c926004808401938290030181865afa158015612646573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061266a9190614aa3565b50935050925050804261267d9190614994565b836020015163ffffffff1610801561269f57506000836020015163ffffffff16115b156126cd57505060e001517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16919050565b6000821361270a576040517f43d4cf6600000000000000000000000000000000000000000000000000000000815260048101839052602401610b0d565b5092915050565b612719612725565b612722816132e1565b50565b60005473ffffffffffffffffffffffffffffffffffffffff1633146127a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401610b0d565b565b6127a6612725565b600b546bffffffffffffffffffffffff166000036127ca57565b60006127d4610de2565b80519091506000819003612814576040517f30274b3a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600b546000906128339083906bffffffffffffffffffffffff16614af3565b905060005b828110156128fe5781600a60008684815181106128575761285761460a565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282829054906101000a90046bffffffffffffffffffffffff166128bf9190614b1e565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550806128f790614639565b9050612838565b506129098282614b43565b600b80546000906129299084906bffffffffffffffffffffffff166145e5565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550505050565b6040805161016081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e0810182905261010081018290526101208101829052610140810191909152604080516101208101825260085463ffffffff80821683526401000000008204811660208401526801000000000000000082048116938301939093526c0100000000000000000000000081048316606083015268ffffffffffffffffff700100000000000000000000000000000000820416608083015264ffffffffff79010000000000000000000000000000000000000000000000000082041660a083015261ffff7e01000000000000000000000000000000000000000000000000000000000000909104811660c083018190526009547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff811660e08501527c0100000000000000000000000000000000000000000000000000000000900490931661010080840191909152850151919291161115612b17576040517fdada758700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600854600090700100000000000000000000000000000000900468ffffffffffffffffff1690506000612b548560e001513a8488608001516130b0565b9050806bffffffffffffffffffffffff1685606001516bffffffffffffffffffffffff161015612bb0576040517ff4d678b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600083610100015163ffffffff1642612bc99190614b6b565b905060003087604001518860a001518960c001516001612be99190614b7e565b8a5180516020918201206101008d015160e08e0151604051612c9d98979695948c918c9132910173ffffffffffffffffffffffffffffffffffffffff9a8b168152988a1660208a015267ffffffffffffffff97881660408a0152959096166060880152608087019390935261ffff9190911660a086015263ffffffff90811660c08601526bffffffffffffffffffffffff9190911660e0850152919091166101008301529091166101208201526101400190565b6040516020818303038152906040528051906020012090506040518061016001604052808281526020013073ffffffffffffffffffffffffffffffffffffffff168152602001846bffffffffffffffffffffffff168152602001886040015173ffffffffffffffffffffffffffffffffffffffff1681526020018860a0015167ffffffffffffffff1681526020018860e0015163ffffffff168152602001886080015168ffffffffffffffffff1681526020018568ffffffffffffffffff168152602001866040015163ffffffff1664ffffffffff168152602001866060015163ffffffff1664ffffffffff1681526020018363ffffffff16815250955085604051602001612dac9190613fdc565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152918152815160209283012060009384526007909252909120555092949350505050565b6000612e0782602061497d565b612e1285602061497d565b612e1e88610144614b6b565b612e289190614b6b565b612e329190614b6b565b612e3d906000614b6b565b9050368114612ea8576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f63616c6c64617461206c656e677468206d69736d6174636800000000000000006044820152606401610b0d565b50505050505050565b600080808080612ec386880188614c7a565b84519499509297509095509350915060ff16801580612ee3575084518114155b80612eef575083518114155b80612efb575082518114155b80612f07575081518114155b15612f6e576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f4669656c6473206d75737420626520657175616c206c656e67746800000000006044820152606401610b0d565b60005b818110156130a1576000613006888381518110612f9057612f9061460a565b6020026020010151888481518110612faa57612faa61460a565b6020026020010151888581518110612fc457612fc461460a565b6020026020010151888681518110612fde57612fde61460a565b6020026020010151888781518110612ff857612ff861460a565b6020026020010151886133d6565b9050600081600681111561301c5761301c61492a565b1480613039575060018160068111156130375761303761492a565b145b15613090578782815181106130505761305061460a565b60209081029190910181015160405133815290917fc708e0440951fd63499c0f7a73819b469ee5dd3ecc356c0ab4eb7f18389009d9910160405180910390a25b5061309a81614639565b9050612f71565b50505050505050505050505050565b600854600090790100000000000000000000000000000000000000000000000000900464ffffffffff1684101561310b57600854790100000000000000000000000000000000000000000000000000900464ffffffffff1693505b600854600090612710906131259063ffffffff168761497d565b61312f9190614d4c565b6131399086614b6b565b60085490915060009087906131729063ffffffff6c010000000000000000000000008204811691680100000000000000009004166149d6565b61317c91906149d6565b63ffffffff16905060006131c66000368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506136ea92505050565b905060006131e7826131d8858761497d565b6131e29190614b6b565b61382c565b9050600061320368ffffffffffffffffff808916908a16614b1e565b905061320f8183614b1e565b9a9950505050505050505050565b6000613227610de2565b511115610d8e57610d8e6127b0565b6000808a8a8a8a8a8a8a8a8a60405160200161325a99989796959493929190614d60565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291905280516020909101207dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e01000000000000000000000000000000000000000000000000000000000000179150509998505050505050505050565b3373ffffffffffffffffffffffffffffffffffffffff821603613360576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401610b0d565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b600080848060200190518101906133ed9190614e2c565b905060003a8261012001518361010001516134089190614ef4565b64ffffffffff16613419919061497d565b905060008460ff166134616000368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506136ea92505050565b61346b9190614d4c565b9050600061347c6131e28385614b6b565b905060006134893a61382c565b90506000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663330605298e8e868b60e0015168ffffffffffffffffff16896134e89190614b1e565b338d6040518763ffffffff1660e01b815260040161350b96959493929190614f12565b60408051808303816000875af1158015613529573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061354d9190614f8e565b909250905060008260068111156135665761356661492a565b1480613583575060018260068111156135815761358161492a565b145b156136d95760008e8152600760205260408120556135a18185614b1e565b336000908152600a6020526040812080547fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166bffffffffffffffffffffffff93841617905560e0890151600b805468ffffffffffffffffff9092169390929161360d91859116614b1e565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055508d7f90815c2e624694e8010bffad2bcefaf96af282ef1bc2ebc0042d1b89a585e0468487848b60c0015168ffffffffffffffffff168c60e0015168ffffffffffffffffff16878b61368c9190614b1e565b6136969190614b1e565b6136a09190614b1e565b604080516bffffffffffffffffffffffff9586168152602081019490945291841683830152909216606082015290519081900360800190a25b509c9b505050505050505050505050565b6000466136f681613860565b1561377257606c73ffffffffffffffffffffffffffffffffffffffff1663c6f7de0e6040518163ffffffff1660e01b8152600401602060405180830381865afa158015613747573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061376b9190614fc1565b9392505050565b61377b81613883565b156138235773420000000000000000000000000000000000000f73ffffffffffffffffffffffffffffffffffffffff166349948e0e8460405180608001604052806048815260200161500a604891396040516020016137db929190614fda565b6040516020818303038152906040526040518263ffffffff1660e01b81526004016138069190613ca1565b602060405180830381865afa158015613747573d6000803e3d6000fd5b50600092915050565b600061385a6138396124b8565b61384b84670de0b6b3a764000061497d565b6138559190614d4c565b6138ca565b92915050565b600061a4b1821480613874575062066eed82145b8061385a57505062066eee1490565b6000600a82148061389557506101a482145b806138a2575062aa37dc82145b806138ae575061210582145b806138bb575062014a3382145b8061385a57505062014a341490565b60006bffffffffffffffffffffffff821115613968576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203960448201527f36206269747300000000000000000000000000000000000000000000000000006064820152608401610b0d565b5090565b604051806103e00160405280601f906020820280368337509192915050565b60008083601f84011261399d57600080fd5b50813567ffffffffffffffff8111156139b557600080fd5b6020830191508360208285010111156139cd57600080fd5b9250929050565b600080602083850312156139e757600080fd5b823567ffffffffffffffff8111156139fe57600080fd5b613a0a8582860161398b565b90969095509350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051610120810167ffffffffffffffff81118282101715613a6957613a69613a16565b60405290565b604051610160810167ffffffffffffffff81118282101715613a6957613a69613a16565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715613ada57613ada613a16565b604052919050565b63ffffffff8116811461272257600080fd5b803561117081613ae2565b68ffffffffffffffffff8116811461272257600080fd5b803561117081613aff565b64ffffffffff8116811461272257600080fd5b803561117081613b21565b803561ffff8116811461117057600080fd5b80357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8116811461117057600080fd5b60006101208284031215613b9057600080fd5b613b98613a45565b613ba183613af4565b8152613baf60208401613af4565b6020820152613bc060408401613af4565b6040820152613bd160608401613af4565b6060820152613be260808401613b16565b6080820152613bf360a08401613b34565b60a0820152613c0460c08401613b3f565b60c0820152613c1560e08401613b51565b60e0820152610100613c28818501613af4565b908201529392505050565b60005b83811015613c4e578181015183820152602001613c36565b50506000910152565b60008151808452613c6f816020860160208601613c33565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60208152600061376b6020830184613c57565b600082601f830112613cc557600080fd5b813567ffffffffffffffff811115613cdf57613cdf613a16565b613d1060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601613a93565b818152846020838601011115613d2557600080fd5b816020850160208301376000918101602001919091529392505050565b600060208284031215613d5457600080fd5b813567ffffffffffffffff811115613d6b57600080fd5b613d7784828501613cb4565b949350505050565b73ffffffffffffffffffffffffffffffffffffffff8116811461272257600080fd5b803561117081613d7f565b6bffffffffffffffffffffffff8116811461272257600080fd5b803561117081613dac565b60008060408385031215613de457600080fd5b8235613def81613d7f565b91506020830135613dff81613dac565b809150509250929050565b600081518084526020808501945080840160005b83811015613e5057815173ffffffffffffffffffffffffffffffffffffffff1687529582019590820190600101613e1e565b509495945050505050565b60208152600061376b6020830184613e0a565b600060208284031215613e8057600080fd5b5035919050565b600060208284031215613e9957600080fd5b813567ffffffffffffffff811115613eb057600080fd5b8201610160818503121561376b57600080fd5b805182526020810151613eee602084018273ffffffffffffffffffffffffffffffffffffffff169052565b506040810151613f0e60408401826bffffffffffffffffffffffff169052565b506060810151613f36606084018273ffffffffffffffffffffffffffffffffffffffff169052565b506080810151613f52608084018267ffffffffffffffff169052565b5060a0810151613f6a60a084018263ffffffff169052565b5060c0810151613f8760c084018268ffffffffffffffffff169052565b5060e0810151613fa460e084018268ffffffffffffffffff169052565b506101008181015164ffffffffff9081169184019190915261012080830151909116908301526101409081015163ffffffff16910152565b610160810161385a8284613ec3565b60008083601f840112613ffd57600080fd5b50813567ffffffffffffffff81111561401557600080fd5b6020830191508360208260051b85010111156139cd57600080fd5b60008060008060008060008060e0898b03121561404c57600080fd5b606089018a81111561405d57600080fd5b8998503567ffffffffffffffff8082111561407757600080fd5b6140838c838d0161398b565b909950975060808b013591508082111561409c57600080fd5b6140a88c838d01613feb565b909750955060a08b01359150808211156140c157600080fd5b506140ce8b828c01613feb565b999c989b50969995989497949560c00135949350505050565b815163ffffffff90811682526020808401518216908301526040808401518216908301526060808401519182169083015261012082019050608083015161413b608084018268ffffffffffffffffff169052565b5060a083015161415460a084018264ffffffffff169052565b5060c083015161416a60c084018261ffff169052565b5060e083015161419a60e08401827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff169052565b506101008381015163ffffffff8116848301525b505092915050565b67ffffffffffffffff8116811461272257600080fd5b8035611170816141b6565b6000806000806000608086880312156141ef57600080fd5b85356141fa816141b6565b9450602086013567ffffffffffffffff81111561421657600080fd5b6142228882890161398b565b909550935050604086013561423681613ae2565b949793965091946060013592915050565b600067ffffffffffffffff82111561426157614261613a16565b5060051b60200190565b600082601f83011261427c57600080fd5b8135602061429161428c83614247565b613a93565b82815260059290921b840181019181810190868411156142b057600080fd5b8286015b848110156142d45780356142c781613d7f565b83529183019183016142b4565b509695505050505050565b803560ff8116811461117057600080fd5b60008060008060008060c0878903121561430957600080fd5b863567ffffffffffffffff8082111561432157600080fd5b61432d8a838b0161426b565b9750602089013591508082111561434357600080fd5b61434f8a838b0161426b565b965061435d60408a016142df565b9550606089013591508082111561437357600080fd5b61437f8a838b01613cb4565b945061438d60808a016141cc565b935060a08901359150808211156143a357600080fd5b506143b089828a01613cb4565b9150509295509295509295565b6000602082840312156143cf57600080fd5b813561376b81613d7f565b600181811c908216806143ee57607f821691505b602082108103614427577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b601f8211156105ec57600081815260208120601f850160051c810160208610156144545750805b601f850160051c820191505b81811015610a8857828155600101614460565b67ffffffffffffffff83111561448b5761448b613a16565b61449f8361449983546143da565b8361442d565b6000601f8411600181146144f157600085156144bb5750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b178355614587565b6000838152602090207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0861690835b828110156145405786850135825560209485019460019092019101614520565b508682101561457b577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b805161117081613aff565b6000602082840312156145ab57600080fd5b815161376b81613aff565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6bffffffffffffffffffffffff82811682821603908082111561270a5761270a6145b6565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361466a5761466a6145b6565b5060010190565b6000610160823603121561468457600080fd5b61468c613a6f565b823567ffffffffffffffff8111156146a357600080fd5b6146af36828601613cb4565b825250602083013560208201526146c860408401613da1565b60408201526146d960608401613dc6565b60608201526146ea60808401613b16565b60808201526146fb60a084016141cc565b60a082015261470c60c084016141cc565b60c082015261471d60e08401613af4565b60e0820152610100614730818501613b3f565b908201526101206147428482016141cc565b90820152610140614754848201613da1565b9082015292915050565b60006020828403121561477057600080fd5b813561376b816141b6565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18436030181126147b057600080fd5b83018035915067ffffffffffffffff8211156147cb57600080fd5b6020019150368190038213156139cd57600080fd5b6000602082840312156147f257600080fd5b61376b82613b3f565b60006020828403121561480d57600080fd5b813561376b81613ae2565b73ffffffffffffffffffffffffffffffffffffffff8a8116825267ffffffffffffffff8a166020830152881660408201526102406060820181905281018690526000610260878982850137600083890182015261ffff8716608084015260a0830186905263ffffffff851660c0840152601f88017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016830101905061320f60e0830184613ec3565b60ff818116838216019081111561385a5761385a6145b6565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600060ff83168061491b5761491b6148d9565b8060ff84160491505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b8183823760009101908152919050565b828152606082602083013760800192915050565b808202811582820484141761385a5761385a6145b6565b8181038181111561385a5761385a6145b6565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b63ffffffff81811683821601908082111561270a5761270a6145b6565b600061012063ffffffff808d1684528b6020850152808b16604085015250806060840152614a238184018a613e0a565b90508281036080840152614a378189613e0a565b905060ff871660a084015282810360c0840152614a548187613c57565b905067ffffffffffffffff851660e0840152828103610100840152614a798185613c57565b9c9b505050505050505050505050565b805169ffffffffffffffffffff8116811461117057600080fd5b600080600080600060a08688031215614abb57600080fd5b614ac486614a89565b9450602086015193506040860151925060608601519150614ae760808701614a89565b90509295509295909350565b60006bffffffffffffffffffffffff80841680614b1257614b126148d9565b92169190910492915050565b6bffffffffffffffffffffffff81811683821601908082111561270a5761270a6145b6565b6bffffffffffffffffffffffff8181168382160280821691908281146141ae576141ae6145b6565b8082018082111561385a5761385a6145b6565b67ffffffffffffffff81811683821601908082111561270a5761270a6145b6565b600082601f830112614bb057600080fd5b81356020614bc061428c83614247565b82815260059290921b84018101918181019086841115614bdf57600080fd5b8286015b848110156142d45780358352918301918301614be3565b600082601f830112614c0b57600080fd5b81356020614c1b61428c83614247565b82815260059290921b84018101918181019086841115614c3a57600080fd5b8286015b848110156142d457803567ffffffffffffffff811115614c5e5760008081fd5b614c6c8986838b0101613cb4565b845250918301918301614c3e565b600080600080600060a08688031215614c9257600080fd5b853567ffffffffffffffff80821115614caa57600080fd5b614cb689838a01614b9f565b96506020880135915080821115614ccc57600080fd5b614cd889838a01614bfa565b95506040880135915080821115614cee57600080fd5b614cfa89838a01614bfa565b94506060880135915080821115614d1057600080fd5b614d1c89838a01614bfa565b93506080880135915080821115614d3257600080fd5b50614d3f88828901614bfa565b9150509295509295909350565b600082614d5b57614d5b6148d9565b500490565b60006101208b835273ffffffffffffffffffffffffffffffffffffffff8b16602084015267ffffffffffffffff808b166040850152816060850152614da78285018b613e0a565b91508382036080850152614dbb828a613e0a565b915060ff881660a085015283820360c0850152614dd88288613c57565b90861660e08501528381036101008501529050614a798185613c57565b805161117081613d7f565b805161117081613dac565b8051611170816141b6565b805161117081613ae2565b805161117081613b21565b60006101608284031215614e3f57600080fd5b614e47613a6f565b82518152614e5760208401614df5565b6020820152614e6860408401614e00565b6040820152614e7960608401614df5565b6060820152614e8a60808401614e0b565b6080820152614e9b60a08401614e16565b60a0820152614eac60c0840161458e565b60c0820152614ebd60e0840161458e565b60e0820152610100614ed0818501614e21565b90820152610120614ee2848201614e21565b90820152610140613c28848201614e16565b64ffffffffff81811683821601908082111561270a5761270a6145b6565b6000610200808352614f268184018a613c57565b90508281036020840152614f3a8189613c57565b6bffffffffffffffffffffffff88811660408601528716606085015273ffffffffffffffffffffffffffffffffffffffff861660808501529150614f83905060a0830184613ec3565b979650505050505050565b60008060408385031215614fa157600080fd5b825160078110614fb057600080fd5b6020840151909250613dff81613dac565b600060208284031215614fd357600080fd5b5051919050565b60008351614fec818460208801613c33565b835190830190615000818360208801613c33565b0194935050505056fe307866666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666a164736f6c6343000813000a", } var FunctionsCoordinator110ABI = FunctionsCoordinator110MetaData.ABI diff --git a/core/gethwrappers/functions/generation/generated-wrapper-dependency-versions-do-not-edit.txt b/core/gethwrappers/functions/generation/generated-wrapper-dependency-versions-do-not-edit.txt index da566182e50..492902a375b 100644 --- a/core/gethwrappers/functions/generation/generated-wrapper-dependency-versions-do-not-edit.txt +++ b/core/gethwrappers/functions/generation/generated-wrapper-dependency-versions-do-not-edit.txt @@ -4,8 +4,7 @@ functions_allow_list: ../../../contracts/solc/v0.8.19/functions/v1_X/TermsOfServ functions_billing_registry_events_mock: ../../../contracts/solc/v0.8.6/functions/v0_0_0/FunctionsBillingRegistryEventsMock.abi ../../../contracts/solc/v0.8.6/functions/v0_0_0/FunctionsBillingRegistryEventsMock.bin 50deeb883bd9c3729702be335c0388f9d8553bab4be5e26ecacac496a89e2b77 functions_client: ../../../contracts/solc/v0.8.19/functions/v1_X/FunctionsClient.abi ../../../contracts/solc/v0.8.19/functions/v1_X/FunctionsClient.bin 2368f537a04489c720a46733f8596c4fc88a31062ecfa966d05f25dd98608aca functions_client_example: ../../../contracts/solc/v0.8.19/functions/v1_X/FunctionsClientExample.abi ../../../contracts/solc/v0.8.19/functions/v1_X/FunctionsClientExample.bin abf32e69f268f40e8530eb8d8e96bf310b798a4c0049a58022d9d2fb527b601b -functions_coordinator: ../../../contracts/solc/v0.8.19/functions/v1_X/FunctionsCoordinator.abi ../../../contracts/solc/v0.8.19/functions/v1_X/FunctionsCoordinator.bin 8c47e8239e1c8d000c832bba7d0148df104002f70366b4d8238f272d43c15edc -functions_coordinator_1_1_0: ../../../contracts/solc/v0.8.19/functions/v1_1_0/FunctionsCoordinator.abi ../../../contracts/solc/v0.8.19/functions/v1_1_0/FunctionsCoordinator.bin 88c2f899cfcb7b21530741b5446f3a32c92d8b457bfdd2a0160f51364b8d5d1a +functions_coordinator: ../../../contracts/solc/v0.8.19/functions/v1_X/FunctionsCoordinator.abi ../../../contracts/solc/v0.8.19/functions/v1_X/FunctionsCoordinator.bin 0f4030e5b24dde706551e9a1f25a516c41b385bcd33f09f74e193bbd05c0adaf functions_load_test_client: ../../../contracts/solc/v0.8.19/functions/v1_X/FunctionsLoadTestClient.abi ../../../contracts/solc/v0.8.19/functions/v1_X/FunctionsLoadTestClient.bin c8dbbd5ebb34435800d6674700068837c3a252db60046a14b0e61e829db517de functions_oracle_events_mock: ../../../contracts/solc/v0.8.6/functions/v0_0_0/FunctionsOracleEventsMock.abi ../../../contracts/solc/v0.8.6/functions/v0_0_0/FunctionsOracleEventsMock.bin 3ca70f966f8fe751987f0ccb50bebb6aa5be77e4a9f835d1ae99e0e9bfb7d52c functions_router: ../../../contracts/solc/v0.8.19/functions/v1_X/FunctionsRouter.abi ../../../contracts/solc/v0.8.19/functions/v1_X/FunctionsRouter.bin 1f6d18f9e0846ad74b37a0a6acef5942ab73ace1e84307f201899f69e732e776 diff --git a/core/gethwrappers/functions/go_generate.go b/core/gethwrappers/functions/go_generate.go index 622713bb23d..0538518da2d 100644 --- a/core/gethwrappers/functions/go_generate.go +++ b/core/gethwrappers/functions/go_generate.go @@ -10,7 +10,6 @@ package gethwrappers //go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.19/functions/v1_X/FunctionsClientExample.abi ../../../contracts/solc/v0.8.19/functions/v1_X/FunctionsClientExample.bin FunctionsClientExample functions_client_example //go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.19/functions/v1_X/FunctionsLoadTestClient.abi ../../../contracts/solc/v0.8.19/functions/v1_X/FunctionsLoadTestClient.bin FunctionsLoadTestClient functions_load_test_client //go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.19/functions/v1_X/FunctionsCoordinator.abi ../../../contracts/solc/v0.8.19/functions/v1_X/FunctionsCoordinator.bin FunctionsCoordinator functions_coordinator -//go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.19/functions/v1_1_0/FunctionsCoordinator.abi ../../../contracts/solc/v0.8.19/functions/v1_1_0/FunctionsCoordinator.bin FunctionsCoordinator_1_1_0 functions_coordinator_1_1_0 //go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.19/functions/v1_X/FunctionsRouter.abi ../../../contracts/solc/v0.8.19/functions/v1_X/FunctionsRouter.bin FunctionsRouter functions_router //go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.19/functions/v1_X/TermsOfServiceAllowList.abi ../../../contracts/solc/v0.8.19/functions/v1_X/TermsOfServiceAllowList.bin TermsOfServiceAllowList functions_allow_list //go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.19/functions/v1_X/FunctionsV1EventsMock.abi ../../../contracts/solc/v0.8.19/functions/v1_X/FunctionsV1EventsMock.bin FunctionsV1EventsMock functions_v1_events_mock diff --git a/core/services/ocr2/plugins/functions/integration_tests/v1/internal/testutils.go b/core/services/ocr2/plugins/functions/integration_tests/v1/internal/testutils.go index 9a4f2a72995..3061d818bf1 100644 --- a/core/services/ocr2/plugins/functions/integration_tests/v1/internal/testutils.go +++ b/core/services/ocr2/plugins/functions/integration_tests/v1/internal/testutils.go @@ -226,12 +226,12 @@ func StartNewChainWithContracts(t *testing.T, nClients int) (*bind.TransactOpts, GasOverheadBeforeCallback: uint32(325_000), GasOverheadAfterCallback: uint32(50_000), RequestTimeoutSeconds: uint32(300), - DonFee: uint16(0), + DonFeeCentsUsd: uint16(0), MaxSupportedRequestDataVersion: uint16(1), FulfillmentGasPriceOverEstimationBP: uint32(1_000), FallbackNativePerUnitLink: big.NewInt(5_000_000_000_000_000), MinimumEstimateGasPriceWei: big.NewInt(1_000_000_000), - OperationFee: uint16(0), + OperationFeeCentsUsd: uint16(0), FallbackUsdPerUnitLink: uint64(1_400_000_000), FallbackUsdPerUnitLinkDecimals: uint8(8), } diff --git a/core/services/relay/evm/functions/logpoller_wrapper.go b/core/services/relay/evm/functions/logpoller_wrapper.go index b85412953cb..b8a50cf5f81 100644 --- a/core/services/relay/evm/functions/logpoller_wrapper.go +++ b/core/services/relay/evm/functions/logpoller_wrapper.go @@ -579,12 +579,12 @@ func (l *logPollerWrapper) logsToRequests(coordinator coordinator, requestLogs [ oracleRequest.Commitment.Client, oracleRequest.Commitment.SubscriptionId, oracleRequest.Commitment.CallbackGasLimit, - oracleRequest.Commitment.AdminFee, - oracleRequest.Commitment.DonFee, + oracleRequest.Commitment.AdminFeeJuels, + oracleRequest.Commitment.DonFeeJuels, oracleRequest.Commitment.GasOverheadBeforeCallback, oracleRequest.Commitment.GasOverheadAfterCallback, oracleRequest.Commitment.TimeoutTimestamp, - oracleRequest.Commitment.OperationFee, + oracleRequest.Commitment.OperationFeeJuels, ) if err != nil { l.lggr.Errorw("LogsToRequests: failed to pack Coordinator v2 commitment bytes, skipping", err) From 1ba2c06d5be136c30f00b4a97a6b349852bbbb93 Mon Sep 17 00:00:00 2001 From: Justin Kaseman Date: Mon, 19 Feb 2024 12:12:21 -0800 Subject: [PATCH 09/19] (test): Run LogPollerWrapperTest v1/v2 tests sequentially --- .../relay/evm/functions/logpoller_wrapper_test.go | 8 -------- 1 file changed, 8 deletions(-) diff --git a/core/services/relay/evm/functions/logpoller_wrapper_test.go b/core/services/relay/evm/functions/logpoller_wrapper_test.go index 76b0db8a5e3..c68739f45a4 100644 --- a/core/services/relay/evm/functions/logpoller_wrapper_test.go +++ b/core/services/relay/evm/functions/logpoller_wrapper_test.go @@ -121,7 +121,6 @@ func getMockedRequestLogV2(t *testing.T) logpoller.Log { } func TestLogPollerWrapper_SingleSubscriberEmptyEvents_CoordinatorV1(t *testing.T) { - t.Parallel() lp, lpWrapper, client := setUp(t, 100_000) // check only once lp.On("LatestBlock").Return(logpoller.LogPollerBlock{BlockNumber: int64(100)}, nil) @@ -153,7 +152,6 @@ func TestLogPollerWrapper_SingleSubscriberEmptyEvents_CoordinatorV1(t *testing.T } func TestLogPollerWrapper_SingleSubscriberEmptyEvents_CoordinatorV2(t *testing.T) { - t.Parallel() lp, lpWrapper, client := setUp(t, 100_000) // check only once lp.On("LatestBlock").Return(logpoller.LogPollerBlock{BlockNumber: int64(100)}, nil) @@ -185,7 +183,6 @@ func TestLogPollerWrapper_SingleSubscriberEmptyEvents_CoordinatorV2(t *testing.T } func TestLogPollerWrapper_ErrorOnZeroAddresses(t *testing.T) { - t.Parallel() lp, lpWrapper, client := setUp(t, 100_000) // check only once lp.On("LatestBlock").Return(logpoller.LogPollerBlock{BlockNumber: int64(100)}, nil) @@ -197,7 +194,6 @@ func TestLogPollerWrapper_ErrorOnZeroAddresses(t *testing.T) { } func TestLogPollerWrapper_LatestEvents_ReorgHandlingV1(t *testing.T) { - t.Parallel() lp, lpWrapper, client := setUp(t, 100_000) lp.On("LatestBlock").Return(logpoller.LogPollerBlock{BlockNumber: int64(100)}, nil) client.On("CallContract", mock.Anything, ethereum.CallMsg{ // getContractById @@ -243,7 +239,6 @@ func TestLogPollerWrapper_LatestEvents_ReorgHandlingV1(t *testing.T) { } func TestLogPollerWrapper_LatestEvents_ReorgHandlingV2(t *testing.T) { - t.Parallel() lp, lpWrapper, client := setUp(t, 100_000) lp.On("LatestBlock").Return(logpoller.LogPollerBlock{BlockNumber: int64(100)}, nil) client.On("CallContract", mock.Anything, ethereum.CallMsg{ // getContractById @@ -289,7 +284,6 @@ func TestLogPollerWrapper_LatestEvents_ReorgHandlingV2(t *testing.T) { } func TestLogPollerWrapper_FilterPreviouslyDetectedEvents_TruncatesLogs(t *testing.T) { - t.Parallel() _, lpWrapper, _ := setUp(t, 100_000) inputLogs := make([]logpoller.Log, maxLogsToProcess+100) @@ -307,7 +301,6 @@ func TestLogPollerWrapper_FilterPreviouslyDetectedEvents_TruncatesLogs(t *testin } func TestLogPollerWrapper_FilterPreviouslyDetectedEvents_SkipsInvalidLog(t *testing.T) { - t.Parallel() _, lpWrapper, _ := setUp(t, 100_000) inputLogs := []logpoller.Log{getMockedRequestLogV1(t)} inputLogs[0].Topics = [][]byte{[]byte("invalid topic")} @@ -322,7 +315,6 @@ func TestLogPollerWrapper_FilterPreviouslyDetectedEvents_SkipsInvalidLog(t *test } func TestLogPollerWrapper_FilterPreviouslyDetectedEvents_FiltersPreviouslyDetectedEvent(t *testing.T) { - t.Parallel() _, lpWrapper, _ := setUp(t, 100_000) mockedRequestLog := getMockedRequestLogV1(t) inputLogs := []logpoller.Log{mockedRequestLog} From f5afdb8c1acc28cdecf39738392a21c30c3d6915 Mon Sep 17 00:00:00 2001 From: Justin Kaseman Date: Mon, 19 Feb 2024 13:00:13 -0800 Subject: [PATCH 10/19] Use typeAndVersion go wrapper more genericly --- .../relay/evm/functions/logpoller_wrapper.go | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/core/services/relay/evm/functions/logpoller_wrapper.go b/core/services/relay/evm/functions/logpoller_wrapper.go index b8a50cf5f81..73c32be7db8 100644 --- a/core/services/relay/evm/functions/logpoller_wrapper.go +++ b/core/services/relay/evm/functions/logpoller_wrapper.go @@ -18,6 +18,7 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/functions/generated/functions_coordinator" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/functions/generated/functions_coordinator_1_1_0" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/functions/generated/functions_router" + type_and_version "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/type_and_version_interface_wrapper" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/functions/config" evmRelayTypes "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/types" @@ -338,21 +339,21 @@ func (l *logPollerWrapper) getCurrentCoordinators(ctx context.Context) (common.A return activeCoordinatorAddress, proposedCoordinator, nil } -func (l *logPollerWrapper) getCoordinatorTypeAndVersion(coordinatorAddress common.Address) (string, error) { - if coordinatorAddress == (common.Address{}) { +func (l *logPollerWrapper) getTypeAndVersion(contractAddress common.Address) (string, error) { + if contractAddress == (common.Address{}) { l.lggr.Debug("LogPollerWrapper: cannot get typeAndVersion from an unset address") return "", nil } - coordinatorContract, err := functions_coordinator.NewFunctionsCoordinator(coordinatorAddress, l.client) + contract, err := type_and_version.NewTypeAndVersionInterface(contractAddress, l.client) if err != nil { - l.lggr.Error("LogPollerWrapper: could not initialize Coordinator contract ", coordinatorAddress) + l.lggr.Error("LogPollerWrapper: could not initialize contract with typeAndVersion interface", contractAddress) return "", err } - typeAndVersion, err := coordinatorContract.TypeAndVersion(&bind.CallOpts{}) + typeAndVersion, err := contract.TypeAndVersion(&bind.CallOpts{}) if err != nil { - l.lggr.Error("LogPollerWrapper: could not get typeAndVersion from Coordinator contract ", coordinatorAddress) + l.lggr.Error("LogPollerWrapper: could not get typeAndVersion from contract ", contractAddress) return "", err } @@ -373,13 +374,13 @@ func (l *logPollerWrapper) handleRouteUpdate(activeCoordinatorAddress common.Add return } - activeCoordinatorTypeAndVersion, err := l.getCoordinatorTypeAndVersion(activeCoordinatorAddress) + activeCoordinatorTypeAndVersion, err := l.getTypeAndVersion(activeCoordinatorAddress) if err != nil { return } activeCoordinator := coordinator{address: activeCoordinatorAddress, typeAndVersion: activeCoordinatorTypeAndVersion} - proposedCoordinatorTypeAndVersion, err := l.getCoordinatorTypeAndVersion(proposedCoordinatorAddress) + proposedCoordinatorTypeAndVersion, err := l.getTypeAndVersion(proposedCoordinatorAddress) if err != nil { return } From 2adfc1b192fce38c3bf50696a2c34df050ab998a Mon Sep 17 00:00:00 2001 From: Gabriel Paradiso Date: Tue, 20 Feb 2024 00:26:17 +0100 Subject: [PATCH 11/19] [FUN-1234] refactor logpoller_wrapper by injecting a coordinator dep (#12066) * fix: test race * Revert "(test): Run LogPollerWrapperTest v1/v2 tests sequentially" This reverts commit 1ba2c06d5be136c30f00b4a97a6b349852bbbb93. * chore: refactor logpoller_wrapper by injecting a coordinator dep * fix: remove duplicates abitype definitions * fix: lint sonarqube reliability issue * fix: race conditions due to share variables --------- Co-authored-by: Justin Kaseman --- .../relay/evm/functions/coordinator_v1.go | 147 +++++++ .../relay/evm/functions/coordinator_v2.go | 146 +++++++ .../relay/evm/functions/logpoller_wrapper.go | 383 +++++------------- .../evm/functions/logpoller_wrapper_test.go | 230 ++++++----- 4 files changed, 529 insertions(+), 377 deletions(-) create mode 100644 core/services/relay/evm/functions/coordinator_v1.go create mode 100644 core/services/relay/evm/functions/coordinator_v2.go diff --git a/core/services/relay/evm/functions/coordinator_v1.go b/core/services/relay/evm/functions/coordinator_v1.go new file mode 100644 index 00000000000..683d39ddd1a --- /dev/null +++ b/core/services/relay/evm/functions/coordinator_v1.go @@ -0,0 +1,147 @@ +package functions + +import ( + "fmt" + + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/common" + + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/client" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/logpoller" + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/functions/generated/functions_coordinator_1_1_0" + "github.com/smartcontractkit/chainlink/v2/core/logger" + evmRelayTypes "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/types" +) + +type CoordinatorV1 struct { + address common.Address + + client client.Client + logPoller logpoller.LogPoller + lggr logger.Logger +} + +func NewCoordinatorV1(address common.Address, client client.Client, logPoller logpoller.LogPoller, lggr logger.Logger) *CoordinatorV1 { + return &CoordinatorV1{ + address: address, + client: client, + logPoller: logPoller, + lggr: lggr, + } +} + +func (c *CoordinatorV1) Address() common.Address { + return c.address +} + +func (c *CoordinatorV1) RegisterFilters() error { + if (c.address == common.Address{}) { + return nil + } + + return c.logPoller.RegisterFilter( + logpoller.Filter{ + Name: logpoller.FilterName("FunctionsLogPollerWrapper", c.address.String(), "-v", "1"), + EventSigs: []common.Hash{ + functions_coordinator_1_1_0.FunctionsCoordinator110OracleRequest{}.Topic(), + functions_coordinator_1_1_0.FunctionsCoordinator110OracleResponse{}.Topic(), + }, + Addresses: []common.Address{c.address}, + }) +} + +func (c *CoordinatorV1) OracleRequestLogTopic() (common.Hash, error) { + return functions_coordinator_1_1_0.FunctionsCoordinator110OracleRequest{}.Topic(), nil +} + +func (c *CoordinatorV1) OracleResponseLogTopic() (common.Hash, error) { + return functions_coordinator_1_1_0.FunctionsCoordinator110OracleResponse{}.Topic(), nil +} + +func (c *CoordinatorV1) LogsToRequests(requestLogs []logpoller.Log) ([]evmRelayTypes.OracleRequest, error) { + var requests []evmRelayTypes.OracleRequest + + parsingContract, err := functions_coordinator_1_1_0.NewFunctionsCoordinator110(c.address, c.client) + if err != nil { + return nil, fmt.Errorf("LogsToRequests: creating a contract instance for NewFunctionsCoordinator110 parsing failed: %w", err) + } + + for _, log := range requestLogs { + gethLog := log.ToGethLog() + oracleRequest, err := parsingContract.ParseOracleRequest(gethLog) + if err != nil { + c.lggr.Errorw("LogsToRequests: failed to parse a request log, skipping", "err", err) + continue + } + + commitmentABIV1 := abi.Arguments{ + {Type: bytes32Type}, // RequestId + {Type: addressType}, // Coordinator + {Type: uint96Type}, // EstimatedTotalCostJuels + {Type: addressType}, // Client + {Type: uint64Type}, // SubscriptionId + {Type: uint32Type}, // CallbackGasLimit + {Type: uint72Type}, // AdminFee + {Type: uint72Type}, // DonFee + {Type: uint40Type}, // GasOverheadBeforeCallback + {Type: uint40Type}, // GasOverheadAfterCallback + {Type: uint32Type}, // TimeoutTimestamp + } + + commitmentBytesV1, err := commitmentABIV1.Pack( + oracleRequest.Commitment.RequestId, + oracleRequest.Commitment.Coordinator, + oracleRequest.Commitment.EstimatedTotalCostJuels, + oracleRequest.Commitment.Client, + oracleRequest.Commitment.SubscriptionId, + oracleRequest.Commitment.CallbackGasLimit, + oracleRequest.Commitment.AdminFee, + oracleRequest.Commitment.DonFee, + oracleRequest.Commitment.GasOverheadBeforeCallback, + oracleRequest.Commitment.GasOverheadAfterCallback, + oracleRequest.Commitment.TimeoutTimestamp, + ) + if err != nil { + c.lggr.Errorw("LogsToRequests: failed to pack Coordinator v1 commitment bytes, skipping", err) + } + + OracleRequestV1 := evmRelayTypes.OracleRequest{ + RequestId: oracleRequest.RequestId, + RequestingContract: oracleRequest.RequestingContract, + RequestInitiator: oracleRequest.RequestInitiator, + SubscriptionId: oracleRequest.SubscriptionId, + SubscriptionOwner: oracleRequest.SubscriptionOwner, + Data: oracleRequest.Data, + DataVersion: oracleRequest.DataVersion, + Flags: oracleRequest.Flags, + CallbackGasLimit: oracleRequest.CallbackGasLimit, + TxHash: oracleRequest.Raw.TxHash, + OnchainMetadata: commitmentBytesV1, + CoordinatorContract: c.address, + } + + requests = append(requests, OracleRequestV1) + } + return requests, nil +} + +func (c *CoordinatorV1) LogsToResponses(responseLogs []logpoller.Log) ([]evmRelayTypes.OracleResponse, error) { + var responses []evmRelayTypes.OracleResponse + + parsingContract, err := functions_coordinator_1_1_0.NewFunctionsCoordinator110(c.address, c.client) + if err != nil { + return nil, fmt.Errorf("LogsToResponses: creating a contract instance for parsing failed: %w", err) + } + for _, log := range responseLogs { + gethLog := log.ToGethLog() + oracleResponse, err := parsingContract.ParseOracleResponse(gethLog) + if err != nil { + c.lggr.Errorw("LogsToResponses: failed to parse a response log, skipping") + continue + } + responses = append(responses, evmRelayTypes.OracleResponse{ + RequestId: oracleResponse.RequestId, + }) + } + return responses, nil +} diff --git a/core/services/relay/evm/functions/coordinator_v2.go b/core/services/relay/evm/functions/coordinator_v2.go new file mode 100644 index 00000000000..4189e575b2a --- /dev/null +++ b/core/services/relay/evm/functions/coordinator_v2.go @@ -0,0 +1,146 @@ +package functions + +import ( + "fmt" + + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/common" + + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/client" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/logpoller" + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/functions/generated/functions_coordinator" + "github.com/smartcontractkit/chainlink/v2/core/logger" + evmRelayTypes "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/types" +) + +type CoordinatorV2 struct { + address common.Address + + client client.Client + logPoller logpoller.LogPoller + lggr logger.Logger +} + +func NewCoordinatorV2(address common.Address, client client.Client, logPoller logpoller.LogPoller, lggr logger.Logger) *CoordinatorV2 { + return &CoordinatorV2{ + address: address, + client: client, + logPoller: logPoller, + lggr: lggr, + } +} + +func (c *CoordinatorV2) Address() common.Address { + return c.address +} + +func (c *CoordinatorV2) RegisterFilters() error { + if (c.address == common.Address{}) { + return nil + } + + return c.logPoller.RegisterFilter( + logpoller.Filter{ + Name: logpoller.FilterName("FunctionsLogPollerWrapper", c.address.String(), "-v", "2"), + EventSigs: []common.Hash{ + functions_coordinator.FunctionsCoordinatorOracleRequest{}.Topic(), + functions_coordinator.FunctionsCoordinatorOracleResponse{}.Topic(), + }, + Addresses: []common.Address{c.address}, + }) +} +func (c *CoordinatorV2) OracleRequestLogTopic() (common.Hash, error) { + return functions_coordinator.FunctionsCoordinatorOracleRequest{}.Topic(), nil +} +func (c *CoordinatorV2) OracleResponseLogTopic() (common.Hash, error) { + return functions_coordinator.FunctionsCoordinatorOracleResponse{}.Topic(), nil +} +func (c *CoordinatorV2) LogsToRequests(requestLogs []logpoller.Log) ([]evmRelayTypes.OracleRequest, error) { + var requests []evmRelayTypes.OracleRequest + + parsingContract, err := functions_coordinator.NewFunctionsCoordinator(c.address, c.client) + if err != nil { + return nil, fmt.Errorf("LogsToRequests: creating a contract instance for NewFunctionsCoordinator parsing failed: %w", err) + } + + for _, log := range requestLogs { + gethLog := log.ToGethLog() + oracleRequest, err := parsingContract.ParseOracleRequest(gethLog) + if err != nil { + c.lggr.Errorw("LogsToRequests: failed to parse a request log, skipping", "err", err) + continue + } + + commitmentABIV2 := abi.Arguments{ + {Type: bytes32Type}, // RequestId + {Type: addressType}, // Coordinator + {Type: uint96Type}, // EstimatedTotalCostJuels + {Type: addressType}, // Client + {Type: uint64Type}, // SubscriptionId + {Type: uint32Type}, // CallbackGasLimit + {Type: uint72Type}, // AdminFee + {Type: uint72Type}, // DonFee + {Type: uint40Type}, // GasOverheadBeforeCallback + {Type: uint40Type}, // GasOverheadAfterCallback + {Type: uint32Type}, // TimeoutTimestamp + {Type: uint72Type}, // OperationFee + } + + commitmentBytesV2, err := commitmentABIV2.Pack( + oracleRequest.Commitment.RequestId, + oracleRequest.Commitment.Coordinator, + oracleRequest.Commitment.EstimatedTotalCostJuels, + oracleRequest.Commitment.Client, + oracleRequest.Commitment.SubscriptionId, + oracleRequest.Commitment.CallbackGasLimit, + oracleRequest.Commitment.AdminFeeJuels, + oracleRequest.Commitment.DonFeeJuels, + oracleRequest.Commitment.GasOverheadBeforeCallback, + oracleRequest.Commitment.GasOverheadAfterCallback, + oracleRequest.Commitment.TimeoutTimestamp, + oracleRequest.Commitment.OperationFeeJuels, + ) + if err != nil { + c.lggr.Errorw("LogsToRequests: failed to pack Coordinator v2 commitment bytes, skipping", err) + } + + OracleRequestV2 := evmRelayTypes.OracleRequest{ + RequestId: oracleRequest.RequestId, + RequestingContract: oracleRequest.RequestingContract, + RequestInitiator: oracleRequest.RequestInitiator, + SubscriptionId: oracleRequest.SubscriptionId, + SubscriptionOwner: oracleRequest.SubscriptionOwner, + Data: oracleRequest.Data, + DataVersion: oracleRequest.DataVersion, + Flags: oracleRequest.Flags, + CallbackGasLimit: oracleRequest.CallbackGasLimit, + TxHash: oracleRequest.Raw.TxHash, + OnchainMetadata: commitmentBytesV2, + CoordinatorContract: c.address, + } + + requests = append(requests, OracleRequestV2) + } + return requests, nil +} + +func (c *CoordinatorV2) LogsToResponses(responseLogs []logpoller.Log) ([]evmRelayTypes.OracleResponse, error) { + var responses []evmRelayTypes.OracleResponse + + parsingContract, err := functions_coordinator.NewFunctionsCoordinator(c.address, c.client) + if err != nil { + return nil, fmt.Errorf("LogsToResponses: creating a contract instance for parsing failed: %w", err) + } + for _, log := range responseLogs { + gethLog := log.ToGethLog() + oracleResponse, err := parsingContract.ParseOracleResponse(gethLog) + if err != nil { + c.lggr.Errorw("LogsToResponses: failed to parse a response log, skipping") + continue + } + responses = append(responses, evmRelayTypes.OracleResponse{ + RequestId: oracleResponse.RequestId, + }) + } + return responses, nil +} diff --git a/core/services/relay/evm/functions/logpoller_wrapper.go b/core/services/relay/evm/functions/logpoller_wrapper.go index 73c32be7db8..a374f01fa9e 100644 --- a/core/services/relay/evm/functions/logpoller_wrapper.go +++ b/core/services/relay/evm/functions/logpoller_wrapper.go @@ -2,6 +2,7 @@ package functions import ( "context" + "fmt" "strings" "sync" "time" @@ -15,8 +16,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/chains/evm/client" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/logpoller" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/functions/generated/functions_coordinator" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/functions/generated/functions_coordinator_1_1_0" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/functions/generated/functions_router" type_and_version "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/type_and_version_interface_wrapper" "github.com/smartcontractkit/chainlink/v2/core/logger" @@ -33,8 +32,8 @@ type logPollerWrapper struct { client client.Client logPoller logpoller.LogPoller subscribers map[string]evmRelayTypes.RouteUpdateSubscriber - activeCoordinator coordinator - proposedCoordinator coordinator + activeCoordinator Coordinator + proposedCoordinator Coordinator requestBlockOffset int64 responseBlockOffset int64 pastBlocksToPoll int64 @@ -57,22 +56,39 @@ type detectedEvents struct { detectedEventsOrdered []detectedEvent } -type coordinator struct { - address common.Address - typeAndVersion string +type Coordinator interface { + Address() common.Address + RegisterFilters() error + OracleRequestLogTopic() (common.Hash, error) + OracleResponseLogTopic() (common.Hash, error) + LogsToRequests(requestLogs []logpoller.Log) ([]evmRelayTypes.OracleRequest, error) + LogsToResponses(responseLogs []logpoller.Log) ([]evmRelayTypes.OracleResponse, error) } const FUNCTIONS_COORDINATOR_VERSION_1_SUBSTRING = "Functions Coordinator v1" const FUNCTIONS_COORDINATOR_VERSION_2_SUBSTRING = "Functions Coordinator v2" -type Functions_Coordinator interface { - *functions_coordinator_1_1_0.FunctionsCoordinator110 | *functions_coordinator.FunctionsCoordinator -} - const logPollerCacheDurationSecDefault = 300 const pastBlocksToPollDefault = 50 const maxLogsToProcess = 1000 +var ( + uint32Type abi.Type + uint40Type abi.Type + uint64Type abi.Type + uint72Type abi.Type + uint96Type abi.Type + addressType abi.Type + bytes32Type abi.Type +) + +func init() { + err := initAbiTypes() + if err != nil { + panic(err) + } +} + var _ evmRelayTypes.LogPollerWrapper = &logPollerWrapper{} func NewLogPollerWrapper(routerContractAddress common.Address, pluginConfig config.PluginConfig, client client.Client, logPoller logpoller.LogPoller, lggr logger.Logger) (evmRelayTypes.LogPollerWrapper, error) { @@ -159,11 +175,11 @@ func (l *logPollerWrapper) Name() string { return l.lggr.Name() } // methods of LogPollerWrapper func (l *logPollerWrapper) LatestEvents() ([]evmRelayTypes.OracleRequest, []evmRelayTypes.OracleResponse, error) { l.mu.Lock() - coordinators := []coordinator{} - if l.activeCoordinator.address != (common.Address{}) { + coordinators := []Coordinator{} + if l.activeCoordinator != nil && l.activeCoordinator.Address() != (common.Address{}) { coordinators = append(coordinators, l.activeCoordinator) } - if l.proposedCoordinator.address != (common.Address{}) && l.activeCoordinator != l.proposedCoordinator { + if l.proposedCoordinator != nil && l.proposedCoordinator.Address() != (common.Address{}) && l.activeCoordinator != l.proposedCoordinator { coordinators = append(coordinators, l.proposedCoordinator) } latest, err := l.logPoller.LatestBlock() @@ -188,12 +204,12 @@ func (l *logPollerWrapper) LatestEvents() ([]evmRelayTypes.OracleRequest, []evmR for _, coordinator := range coordinators { requestEndBlock := latestBlockNum - l.requestBlockOffset - requestLogTopic, err := oracleRequestLogTopic(coordinator) + requestLogTopic, err := coordinator.OracleRequestLogTopic() if err != nil { l.lggr.Errorw("LatestEvents: ", err) return nil, nil, err } - requestLogs, err := l.logPoller.Logs(startBlockNum, requestEndBlock, requestLogTopic, coordinator.address) + requestLogs, err := l.logPoller.Logs(startBlockNum, requestEndBlock, requestLogTopic, coordinator.Address()) if err != nil { l.lggr.Errorw("LatestEvents: fetching request logs from LogPoller failed", "startBlock", startBlockNum, "endBlock", requestEndBlock) return nil, nil, err @@ -201,12 +217,12 @@ func (l *logPollerWrapper) LatestEvents() ([]evmRelayTypes.OracleRequest, []evmR l.lggr.Debugw("LatestEvents: fetched request logs", "nRequestLogs", len(requestLogs), "latestBlock", latest, "startBlock", startBlockNum, "endBlock", requestEndBlock) requestLogs = l.filterPreviouslyDetectedEvents(requestLogs, &l.detectedRequests, "requests") responseEndBlock := latestBlockNum - l.responseBlockOffset - responseLogTopic, err := oracleResponseLogTopic(coordinator) + responseLogTopic, err := coordinator.OracleResponseLogTopic() if err != nil { l.lggr.Errorw("LatestEvents: ", err) return nil, nil, err } - responseLogs, err := l.logPoller.Logs(startBlockNum, responseEndBlock, responseLogTopic, coordinator.address) + responseLogs, err := l.logPoller.Logs(startBlockNum, responseEndBlock, responseLogTopic, coordinator.Address()) if err != nil { l.lggr.Errorw("LatestEvents: fetching response logs from LogPoller failed", "startBlock", startBlockNum, "endBlock", responseEndBlock) return nil, nil, err @@ -214,13 +230,13 @@ func (l *logPollerWrapper) LatestEvents() ([]evmRelayTypes.OracleRequest, []evmR l.lggr.Debugw("LatestEvents: fetched request logs", "nResponseLogs", len(responseLogs), "latestBlock", latest, "startBlock", startBlockNum, "endBlock", responseEndBlock) responseLogs = l.filterPreviouslyDetectedEvents(responseLogs, &l.detectedResponses, "responses") - l.lggr.Debugw("LatestEvents: parsing logs", "nRequestLogs", len(requestLogs), "nResponseLogs", len(responseLogs), "coordinatorAddress", coordinator.address.Hex()) - requests, err := l.logsToRequests(coordinator, requestLogs) + l.lggr.Debugw("LatestEvents: parsing logs", "nRequestLogs", len(requestLogs), "nResponseLogs", len(responseLogs), "coordinatorAddress", coordinator.Address().Hex()) + requests, err := coordinator.LogsToRequests(requestLogs) if err != nil { return nil, nil, err } resultsReq = append(resultsReq, requests...) - responses, err := l.logsToResponses(coordinator, responseLogs) + responses, err := coordinator.LogsToResponses(responseLogs) if err != nil { return nil, nil, err } @@ -333,7 +349,7 @@ func (l *logPollerWrapper) getCurrentCoordinators(ctx context.Context) (common.A Context: ctx, }, donId) if err != nil { - return activeCoordinatorAddress, l.proposedCoordinator.address, nil + return activeCoordinatorAddress, l.proposedCoordinator.Address(), nil } return activeCoordinatorAddress, proposedCoordinator, nil @@ -369,291 +385,104 @@ func (l *logPollerWrapper) handleRouteUpdate(activeCoordinatorAddress common.Add return } - if activeCoordinatorAddress == l.activeCoordinator.address && proposedCoordinatorAddress == l.proposedCoordinator.address { + if (l.activeCoordinator != nil && l.activeCoordinator.Address() == activeCoordinatorAddress) && + (l.proposedCoordinator != nil && l.proposedCoordinator.Address() == proposedCoordinatorAddress) { l.lggr.Debug("LogPollerWrapper: no changes to routes") return } activeCoordinatorTypeAndVersion, err := l.getTypeAndVersion(activeCoordinatorAddress) if err != nil { + l.lggr.Errorf("LogPollerWrapper: failed to get active coordinatorTypeAndVersion: %w", err) return } - activeCoordinator := coordinator{address: activeCoordinatorAddress, typeAndVersion: activeCoordinatorTypeAndVersion} - - proposedCoordinatorTypeAndVersion, err := l.getTypeAndVersion(proposedCoordinatorAddress) - if err != nil { - return - } - proposedCoordinator := coordinator{address: proposedCoordinatorAddress, typeAndVersion: proposedCoordinatorTypeAndVersion} - - errActive := l.registerFilters(activeCoordinator) - errProposed := l.registerFilters(proposedCoordinator) - if errActive != nil || errProposed != nil { - l.lggr.Errorw("LogPollerWrapper: Failed to register filters", "errorActive", errActive, "errorProposed", errProposed) + var activeCoordinator Coordinator + switch { + case strings.Contains(activeCoordinatorTypeAndVersion, FUNCTIONS_COORDINATOR_VERSION_1_SUBSTRING): + activeCoordinator = NewCoordinatorV1(activeCoordinatorAddress, l.client, l.logPoller, l.lggr) + case strings.Contains(activeCoordinatorTypeAndVersion, FUNCTIONS_COORDINATOR_VERSION_2_SUBSTRING): + activeCoordinator = NewCoordinatorV2(activeCoordinatorAddress, l.client, l.logPoller, l.lggr) + default: + l.lggr.Errorf("LogPollerWrapper: Invalid active coordinator type and version: %q", activeCoordinatorTypeAndVersion) return } - l.lggr.Debugw("LogPollerWrapper: new routes", "activeCoordinator", activeCoordinator.address.Hex(), "proposedCoordinator", proposedCoordinator.address.Hex()) - l.activeCoordinator = activeCoordinator - l.proposedCoordinator = proposedCoordinator - - for _, subscriber := range l.subscribers { - err := subscriber.UpdateRoutes(activeCoordinator.address, proposedCoordinator.address) + if activeCoordinator != nil { + err = activeCoordinator.RegisterFilters() if err != nil { - l.lggr.Errorw("LogPollerWrapper: Failed to update routes", "err", err) + l.lggr.Errorw("LogPollerWrapper: Failed to register active coordinator filters", err) + return } - } -} - -func filterName(addr common.Address, version string) string { - return logpoller.FilterName("FunctionsLogPollerWrapper", addr.String(), "-v", version) -} - -func (l *logPollerWrapper) registerFilters(coordinator coordinator) error { - if (coordinator.address == common.Address{}) { - return nil + l.activeCoordinator = activeCoordinator + l.lggr.Debugw("LogPollerWrapper: new routes", "activeCoordinator", activeCoordinator.Address().Hex()) } - if strings.Contains(coordinator.typeAndVersion, FUNCTIONS_COORDINATOR_VERSION_1_SUBSTRING) { - return l.logPoller.RegisterFilter( - logpoller.Filter{ - Name: filterName(coordinator.address, "1"), - EventSigs: []common.Hash{ - functions_coordinator_1_1_0.FunctionsCoordinator110OracleRequest{}.Topic(), - functions_coordinator_1_1_0.FunctionsCoordinator110OracleResponse{}.Topic(), - }, - Addresses: []common.Address{coordinator.address}, - }) - } - - if strings.Contains(coordinator.typeAndVersion, FUNCTIONS_COORDINATOR_VERSION_2_SUBSTRING) { - return l.logPoller.RegisterFilter( - logpoller.Filter{ - Name: filterName(coordinator.address, "2"), - EventSigs: []common.Hash{ - functions_coordinator.FunctionsCoordinatorOracleRequest{}.Topic(), - functions_coordinator.FunctionsCoordinatorOracleResponse{}.Topic(), - }, - Addresses: []common.Address{coordinator.address}, - }) - } - - l.lggr.Errorw("RegisterFilters: Unsupported Coordinator version ", coordinator.typeAndVersion) - return errors.Errorf("RegisterFilters: Unsupported Coordinator version") -} - -func oracleRequestLogTopic(coordinator coordinator) (common.Hash, error) { - if strings.Contains(coordinator.typeAndVersion, FUNCTIONS_COORDINATOR_VERSION_1_SUBSTRING) { - return functions_coordinator_1_1_0.FunctionsCoordinator110OracleRequest{}.Topic(), nil - } - if strings.Contains(coordinator.typeAndVersion, FUNCTIONS_COORDINATOR_VERSION_2_SUBSTRING) { - return functions_coordinator.FunctionsCoordinatorOracleRequest{}.Topic(), nil - } - return common.Hash{}, errors.Errorf("OracleRequestLogTopic: Unsupported Coordinator version %s", coordinator.typeAndVersion) -} - -func oracleResponseLogTopic(coordinator coordinator) (common.Hash, error) { - if strings.Contains(coordinator.typeAndVersion, FUNCTIONS_COORDINATOR_VERSION_1_SUBSTRING) { - return functions_coordinator_1_1_0.FunctionsCoordinator110OracleResponse{}.Topic(), nil - } - if strings.Contains(coordinator.typeAndVersion, FUNCTIONS_COORDINATOR_VERSION_2_SUBSTRING) { - return functions_coordinator.FunctionsCoordinatorOracleResponse{}.Topic(), nil + proposedCoordinatorTypeAndVersion, err := l.getTypeAndVersion(proposedCoordinatorAddress) + if err != nil { + l.lggr.Errorf("LogPollerWrapper: failed to get proposed coordinatorTypeAndVersion: %w", err) + return } - return common.Hash{}, errors.Errorf("OracleResponseLogTopic: Unsupported Coordinator version %s", coordinator.typeAndVersion) -} - -func (l *logPollerWrapper) logsToRequests(coordinator coordinator, requestLogs []logpoller.Log) ([]evmRelayTypes.OracleRequest, error) { - var requests []evmRelayTypes.OracleRequest - uint32Type, errType1 := abi.NewType("uint32", "uint32", nil) - uint40Type, errType2 := abi.NewType("uint40", "uint40", nil) - uint64Type, errType3 := abi.NewType("uint64", "uint64", nil) - uint72Type, errType4 := abi.NewType("uint72", "uint72", nil) - uint96Type, errType5 := abi.NewType("uint96", "uint96", nil) - addressType, errType6 := abi.NewType("address", "address", nil) - bytes32Type, errType7 := abi.NewType("bytes32", "bytes32", nil) + var proposedCoordinator Coordinator + switch { + // proposedCoordinatorTypeAndVersion can be empty due to an empty proposedCoordinatorAddress + case proposedCoordinatorTypeAndVersion == "": + proposedCoordinator = NewCoordinatorV1(proposedCoordinatorAddress, l.client, l.logPoller, l.lggr) + case strings.Contains(proposedCoordinatorTypeAndVersion, FUNCTIONS_COORDINATOR_VERSION_1_SUBSTRING): + proposedCoordinator = NewCoordinatorV1(proposedCoordinatorAddress, l.client, l.logPoller, l.lggr) + case strings.Contains(proposedCoordinatorTypeAndVersion, FUNCTIONS_COORDINATOR_VERSION_2_SUBSTRING): + proposedCoordinator = NewCoordinatorV2(proposedCoordinatorAddress, l.client, l.logPoller, l.lggr) - if errType1 != nil || errType2 != nil || errType3 != nil || errType4 != nil || errType5 != nil || errType6 != nil || errType7 != nil { - l.lggr.Errorw("LogsToRequests: failed to initialize types", "errType1", errType1, - "errType2", errType2, "errType3", errType3, "errType4", errType4, "errType5", errType5, "errType6", errType6, "errType7", errType7, - ) } - if strings.Contains(coordinator.typeAndVersion, FUNCTIONS_COORDINATOR_VERSION_1_SUBSTRING) { - parsingContract, err := functions_coordinator_1_1_0.NewFunctionsCoordinator110(coordinator.address, l.client) + if proposedCoordinator != nil { + err = proposedCoordinator.RegisterFilters() if err != nil { - return nil, errors.Errorf("LogsToRequests: creating a contract instance for NewFunctionsCoordinator110 parsing failed") - } - - for _, log := range requestLogs { - gethLog := log.ToGethLog() - oracleRequest, err := parsingContract.ParseOracleRequest(gethLog) - if err != nil { - l.lggr.Errorw("LogsToRequests: failed to parse a request log, skipping", "err", err) - continue - } - - commitmentABIV1 := abi.Arguments{ - {Type: bytes32Type}, // RequestId - {Type: addressType}, // Coordinator - {Type: uint96Type}, // EstimatedTotalCostJuels - {Type: addressType}, // Client - {Type: uint64Type}, // SubscriptionId - {Type: uint32Type}, // CallbackGasLimit - {Type: uint72Type}, // AdminFee - {Type: uint72Type}, // DonFee - {Type: uint40Type}, // GasOverheadBeforeCallback - {Type: uint40Type}, // GasOverheadAfterCallback - {Type: uint32Type}, // TimeoutTimestamp - } - - commitmentBytesV1, err := commitmentABIV1.Pack( - oracleRequest.Commitment.RequestId, - oracleRequest.Commitment.Coordinator, - oracleRequest.Commitment.EstimatedTotalCostJuels, - oracleRequest.Commitment.Client, - oracleRequest.Commitment.SubscriptionId, - oracleRequest.Commitment.CallbackGasLimit, - oracleRequest.Commitment.AdminFee, - oracleRequest.Commitment.DonFee, - oracleRequest.Commitment.GasOverheadBeforeCallback, - oracleRequest.Commitment.GasOverheadAfterCallback, - oracleRequest.Commitment.TimeoutTimestamp, - ) - if err != nil { - l.lggr.Errorw("LogsToRequests: failed to pack Coordinator v1 commitment bytes, skipping", err) - } - - OracleRequestV1 := evmRelayTypes.OracleRequest{ - RequestId: oracleRequest.RequestId, - RequestingContract: oracleRequest.RequestingContract, - RequestInitiator: oracleRequest.RequestInitiator, - SubscriptionId: oracleRequest.SubscriptionId, - SubscriptionOwner: oracleRequest.SubscriptionOwner, - Data: oracleRequest.Data, - DataVersion: oracleRequest.DataVersion, - Flags: oracleRequest.Flags, - CallbackGasLimit: oracleRequest.CallbackGasLimit, - TxHash: oracleRequest.Raw.TxHash, - OnchainMetadata: commitmentBytesV1, - CoordinatorContract: coordinator.address, - } - - requests = append(requests, OracleRequestV1) + l.lggr.Errorw("LogPollerWrapper: Failed to register proposed coordinator filters", err) + return } - return requests, nil + l.proposedCoordinator = proposedCoordinator + l.lggr.Debugw("LogPollerWrapper: new routes", "proposedCoordinator", proposedCoordinator.Address().Hex()) } - if strings.Contains(coordinator.typeAndVersion, FUNCTIONS_COORDINATOR_VERSION_2_SUBSTRING) { - parsingContract, err := functions_coordinator.NewFunctionsCoordinator(coordinator.address, l.client) + for _, subscriber := range l.subscribers { + err := subscriber.UpdateRoutes(activeCoordinator.Address(), proposedCoordinator.Address()) if err != nil { - return nil, errors.Errorf("LogsToRequests: creating a contract instance for NewFunctionsCoordinator parsing failed") - } - - for _, log := range requestLogs { - gethLog := log.ToGethLog() - oracleRequest, err := parsingContract.ParseOracleRequest(gethLog) - if err != nil { - l.lggr.Errorw("LogsToRequests: failed to parse a request log, skipping", "err", err) - continue - } - - commitmentABIV2 := abi.Arguments{ - {Type: bytes32Type}, // RequestId - {Type: addressType}, // Coordinator - {Type: uint96Type}, // EstimatedTotalCostJuels - {Type: addressType}, // Client - {Type: uint64Type}, // SubscriptionId - {Type: uint32Type}, // CallbackGasLimit - {Type: uint72Type}, // AdminFee - {Type: uint72Type}, // DonFee - {Type: uint40Type}, // GasOverheadBeforeCallback - {Type: uint40Type}, // GasOverheadAfterCallback - {Type: uint32Type}, // TimeoutTimestamp - {Type: uint72Type}, // OperationFee - } - - commitmentBytesV2, err := commitmentABIV2.Pack( - oracleRequest.Commitment.RequestId, - oracleRequest.Commitment.Coordinator, - oracleRequest.Commitment.EstimatedTotalCostJuels, - oracleRequest.Commitment.Client, - oracleRequest.Commitment.SubscriptionId, - oracleRequest.Commitment.CallbackGasLimit, - oracleRequest.Commitment.AdminFeeJuels, - oracleRequest.Commitment.DonFeeJuels, - oracleRequest.Commitment.GasOverheadBeforeCallback, - oracleRequest.Commitment.GasOverheadAfterCallback, - oracleRequest.Commitment.TimeoutTimestamp, - oracleRequest.Commitment.OperationFeeJuels, - ) - if err != nil { - l.lggr.Errorw("LogsToRequests: failed to pack Coordinator v2 commitment bytes, skipping", err) - } - - OracleRequestV2 := evmRelayTypes.OracleRequest{ - RequestId: oracleRequest.RequestId, - RequestingContract: oracleRequest.RequestingContract, - RequestInitiator: oracleRequest.RequestInitiator, - SubscriptionId: oracleRequest.SubscriptionId, - SubscriptionOwner: oracleRequest.SubscriptionOwner, - Data: oracleRequest.Data, - DataVersion: oracleRequest.DataVersion, - Flags: oracleRequest.Flags, - CallbackGasLimit: oracleRequest.CallbackGasLimit, - TxHash: oracleRequest.Raw.TxHash, - OnchainMetadata: commitmentBytesV2, - CoordinatorContract: coordinator.address, - } - - requests = append(requests, OracleRequestV2) + l.lggr.Errorw("LogPollerWrapper: Failed to update routes", "err", err) } - return requests, nil } - - return nil, errors.Errorf("LogsToRequests: Unsupported Coordinator version %s", coordinator.typeAndVersion) } -func (l *logPollerWrapper) logsToResponses(coordinator coordinator, responseLogs []logpoller.Log) ([]evmRelayTypes.OracleResponse, error) { - var responses []evmRelayTypes.OracleResponse - - if strings.Contains(coordinator.typeAndVersion, FUNCTIONS_COORDINATOR_VERSION_1_SUBSTRING) { - parsingContract, err := functions_coordinator_1_1_0.NewFunctionsCoordinator110(coordinator.address, l.client) - if err != nil { - return nil, errors.Errorf("LogsToResponses: creating a contract instance for parsing failed") - } - for _, log := range responseLogs { - gethLog := log.ToGethLog() - oracleResponse, err := parsingContract.ParseOracleResponse(gethLog) - if err != nil { - l.lggr.Errorw("LogsToResponses: failed to parse a response log, skipping") - continue - } - responses = append(responses, evmRelayTypes.OracleResponse{ - RequestId: oracleResponse.RequestId, - }) - } - return responses, nil +func initAbiTypes() error { + var err error + uint32Type, err = abi.NewType("uint32", "uint32", nil) + if err != nil { + return fmt.Errorf("LogsToRequests: failed to initialize uint32Type type: %w", err) } - - if strings.Contains(coordinator.typeAndVersion, FUNCTIONS_COORDINATOR_VERSION_2_SUBSTRING) { - parsingContract, err := functions_coordinator.NewFunctionsCoordinator(coordinator.address, l.client) - if err != nil { - return nil, errors.Errorf("LogsToResponses: creating a contract instance for parsing failed") - } - for _, log := range responseLogs { - gethLog := log.ToGethLog() - oracleResponse, err := parsingContract.ParseOracleResponse(gethLog) - if err != nil { - l.lggr.Errorw("LogsToResponses: failed to parse a response log, skipping") - continue - } - responses = append(responses, evmRelayTypes.OracleResponse{ - RequestId: oracleResponse.RequestId, - }) - } - return responses, nil + uint40Type, err = abi.NewType("uint40", "uint40", nil) + if err != nil { + return fmt.Errorf("LogsToRequests: failed to initialize uint40Type type: %w", err) + } + uint64Type, err = abi.NewType("uint64", "uint64", nil) + if err != nil { + return fmt.Errorf("LogsToRequests: failed to initialize uint64Type type: %w", err) + } + uint72Type, err = abi.NewType("uint72", "uint72", nil) + if err != nil { + return fmt.Errorf("LogsToRequests: failed to initialize uint72Type type: %w", err) + } + uint96Type, err = abi.NewType("uint96", "uint96", nil) + if err != nil { + return fmt.Errorf("LogsToRequests: failed to initialize uint96Type type: %w", err) + } + addressType, err = abi.NewType("address", "address", nil) + if err != nil { + return fmt.Errorf("LogsToRequests: failed to initialize addressType type: %w", err) + } + bytes32Type, err = abi.NewType("bytes32", "bytes32", nil) + if err != nil { + return fmt.Errorf("LogsToRequests: failed to initialize bytes32Type type: %w", err) } - return nil, errors.Errorf("LogsToResponses: Unsupported Coordinator version %s", coordinator.typeAndVersion) + return nil } diff --git a/core/services/relay/evm/functions/logpoller_wrapper_test.go b/core/services/relay/evm/functions/logpoller_wrapper_test.go index c68739f45a4..9087356c65b 100644 --- a/core/services/relay/evm/functions/logpoller_wrapper_test.go +++ b/core/services/relay/evm/functions/logpoller_wrapper_test.go @@ -37,11 +37,6 @@ const ( OracleRequestV200 = `[{"constant":true,"inputs":[{"indexed":true,"internalType":"bytes32","name":"requestId","type":"bytes32"},{"indexed":true,"internalType":"address","name":"requestingContract","type":"address"},{"indexed":false,"internalType":"address","name":"requestInitiator","type":"address"},{"indexed":false,"internalType":"uint64","name":"subscriptionId","type":"uint64"},{"indexed":false,"internalType":"address","name":"subscriptionOwner","type":"address"},{"indexed":false,"internalType":"bytes","name":"data","type":"bytes"},{"indexed":false,"internalType":"uint16","name":"dataVersion","type":"uint16"},{"indexed":false,"internalType":"bytes32","name":"flags","type":"bytes32"},{"indexed":false,"internalType":"uint64","name":"callbackGasLimit","type":"uint64"},{"components":[{"internalType":"bytes32","name":"requestId","type":"bytes32"},{"internalType":"address","name":"coordinator","type":"address"},{"internalType":"uint96","name":"estimatedTotalCostJuels","type":"uint96"},{"internalType":"address","name":"client","type":"address"},{"internalType":"uint64","name":"subscriptionId","type":"uint64"},{"internalType":"uint32","name":"callbackGasLimit","type":"uint32"},{"internalType":"uint72","name":"adminFee","type":"uint72"},{"internalType":"uint72","name":"donFee","type":"uint72"},{"internalType":"uint40","name":"gasOverheadBeforeCallback","type":"uint40"},{"internalType":"uint40","name":"gasOverheadAfterCallback","type":"uint40"},{"internalType":"uint32","name":"timeoutTimestamp","type":"uint32"},{"internalType":"uint72","name":"operationFee","type":"uint72"}],"indexed":false,"internalType":"structFunctionsResponse.Commitment","name":"commitment","type":"tuple"}],"name":"OracleRequest","type":"function"}]` ) -var routerAddressBytes []byte -var routerAddressHex common.Address -var coordinatorAddressBytes []byte -var coordinatorAddressHex common.Address - func (s *subscriber) UpdateRoutes(activeCoordinator common.Address, proposedCoordinator common.Address) error { if s.expectedCalls == 0 { panic("unexpected call to UpdateRoutes") @@ -60,28 +55,42 @@ func newSubscriber(expectedCalls int) *subscriber { return sub } -func addr(t *testing.T, lastByte string) []byte { +func addr(lastByte string) ([]byte, error) { contractAddr, err := hex.DecodeString("00000000000000000000000000000000000000000000000000000000000000" + lastByte) - require.NoError(t, err) - return contractAddr + if err != nil { + return []byte{}, err + } + return contractAddr, nil +} + +type setupResponse struct { + LogPoller *lpmocks.LogPoller + LogPollerWrapper types.LogPollerWrapper + Client *evmclimocks.Client + RouterAddress common.Address + CoordinatorAddress common.Address + CoordinatorAddressBytes []byte } -func setUp(t *testing.T, updateFrequencySec uint32) (*lpmocks.LogPoller, types.LogPollerWrapper, *evmclimocks.Client) { +func setUp(t *testing.T, updateFrequencySec uint32) setupResponse { + s := setupResponse{} lggr := logger.TestLogger(t) - client := evmclimocks.NewClient(t) - lp := lpmocks.NewLogPoller(t) + s.Client = evmclimocks.NewClient(t) + s.LogPoller = lpmocks.NewLogPoller(t) config := config.PluginConfig{ ContractUpdateCheckFrequencySec: updateFrequencySec, ContractVersion: 1, } - routerAddressBytes = addr(t, "01") - routerAddressHex = common.BytesToAddress(routerAddressBytes) - coordinatorAddressBytes = addr(t, "02") - coordinatorAddressHex = common.BytesToAddress(coordinatorAddressBytes) - lpWrapper, err := NewLogPollerWrapper(routerAddressHex, config, client, lp, lggr) + routerAddressBytes, err := addr("01") + require.NoError(t, err) + s.RouterAddress = common.BytesToAddress(routerAddressBytes) + s.CoordinatorAddressBytes, err = addr("02") + require.NoError(t, err) + s.CoordinatorAddress = common.BytesToAddress(s.CoordinatorAddressBytes) + s.LogPollerWrapper, err = NewLogPollerWrapper(s.RouterAddress, config, s.Client, s.LogPoller, lggr) require.NoError(t, err) - return lp, lpWrapper, client + return s } func getMockedRequestLogV1(t *testing.T) logpoller.Log { @@ -121,177 +130,196 @@ func getMockedRequestLogV2(t *testing.T) logpoller.Log { } func TestLogPollerWrapper_SingleSubscriberEmptyEvents_CoordinatorV1(t *testing.T) { - lp, lpWrapper, client := setUp(t, 100_000) // check only once - lp.On("LatestBlock").Return(logpoller.LogPollerBlock{BlockNumber: int64(100)}, nil) + t.Parallel() + setup := setUp(t, 100_000) // check only once + setup.LogPoller.On("LatestBlock").Return(logpoller.LogPollerBlock{BlockNumber: int64(100)}, nil) - lp.On("Logs", mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return([]logpoller.Log{}, nil) - client.On("CallContract", mock.Anything, ethereum.CallMsg{ // getContractById - To: &routerAddressHex, + setup.LogPoller.On("Logs", mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return([]logpoller.Log{}, nil) + setup.Client.On("CallContract", mock.Anything, ethereum.CallMsg{ // getContractById + To: &setup.RouterAddress, Data: []uint8{0xa9, 0xc9, 0xa9, 0x18, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, - }, mock.Anything).Return(coordinatorAddressBytes, nil) - client.On("CallContract", mock.Anything, ethereum.CallMsg{ // getProposedContractById - To: &routerAddressHex, + }, mock.Anything).Return(setup.CoordinatorAddressBytes, nil) + setup.Client.On("CallContract", mock.Anything, ethereum.CallMsg{ // getProposedContractById + To: &setup.RouterAddress, Data: []uint8{0x6a, 0x22, 0x15, 0xde, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, - }, mock.Anything).Return(addr(t, "00"), nil) - lp.On("RegisterFilter", mock.Anything).Return(nil) + }, mock.Anything).Return(addr("00")) + setup.LogPoller.On("RegisterFilter", mock.Anything).Return(nil) typeAndVersionResponse, err := encodeTypeAndVersion(CoordinatorContractV100) require.NoError(t, err) - client.On("CallContract", mock.Anything, ethereum.CallMsg{ // typeAndVersion - To: &coordinatorAddressHex, + setup.Client.On("CallContract", mock.Anything, ethereum.CallMsg{ // typeAndVersion + To: &setup.CoordinatorAddress, Data: hexutil.MustDecode("0x181f5a77"), }, mock.Anything).Return(typeAndVersionResponse, nil) subscriber := newSubscriber(1) - lpWrapper.SubscribeToUpdates("mock_subscriber", subscriber) + setup.LogPollerWrapper.SubscribeToUpdates("mock_subscriber", subscriber) - servicetest.Run(t, lpWrapper) + servicetest.Run(t, setup.LogPollerWrapper) subscriber.updates.Wait() - reqs, resps, err := lpWrapper.LatestEvents() + reqs, resps, err := setup.LogPollerWrapper.LatestEvents() require.NoError(t, err) require.Equal(t, 0, len(reqs)) require.Equal(t, 0, len(resps)) } func TestLogPollerWrapper_SingleSubscriberEmptyEvents_CoordinatorV2(t *testing.T) { - lp, lpWrapper, client := setUp(t, 100_000) // check only once - lp.On("LatestBlock").Return(logpoller.LogPollerBlock{BlockNumber: int64(100)}, nil) + t.Parallel() + setup := setUp(t, 100_000) // check only once + setup.LogPoller.On("LatestBlock").Return(logpoller.LogPollerBlock{BlockNumber: int64(100)}, nil) - lp.On("Logs", mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return([]logpoller.Log{}, nil) - client.On("CallContract", mock.Anything, ethereum.CallMsg{ // getContractById - To: &routerAddressHex, + setup.LogPoller.On("Logs", mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return([]logpoller.Log{}, nil) + setup.Client.On("CallContract", mock.Anything, ethereum.CallMsg{ // getContractById + To: &setup.RouterAddress, Data: []uint8{0xa9, 0xc9, 0xa9, 0x18, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, - }, mock.Anything).Return(coordinatorAddressBytes, nil) - client.On("CallContract", mock.Anything, ethereum.CallMsg{ // getProposedContractById - To: &routerAddressHex, + }, mock.Anything).Return(setup.CoordinatorAddressBytes, nil) + setup.Client.On("CallContract", mock.Anything, ethereum.CallMsg{ // getProposedContractById + To: &setup.RouterAddress, Data: []uint8{0x6a, 0x22, 0x15, 0xde, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, - }, mock.Anything).Return(addr(t, "00"), nil) - lp.On("RegisterFilter", mock.Anything).Return(nil) + }, mock.Anything).Return(addr("00")) + setup.LogPoller.On("RegisterFilter", mock.Anything).Return(nil) typeAndVersionResponse, err := encodeTypeAndVersion(CoordinatorContractV200) require.NoError(t, err) - client.On("CallContract", mock.Anything, ethereum.CallMsg{ // typeAndVersion - To: &coordinatorAddressHex, + setup.Client.On("CallContract", mock.Anything, ethereum.CallMsg{ // typeAndVersion + To: &setup.CoordinatorAddress, Data: hexutil.MustDecode("0x181f5a77"), }, mock.Anything).Return(typeAndVersionResponse, nil) subscriber := newSubscriber(1) - lpWrapper.SubscribeToUpdates("mock_subscriber", subscriber) + setup.LogPollerWrapper.SubscribeToUpdates("mock_subscriber", subscriber) - servicetest.Run(t, lpWrapper) + servicetest.Run(t, setup.LogPollerWrapper) subscriber.updates.Wait() - reqs, resps, err := lpWrapper.LatestEvents() + reqs, resps, err := setup.LogPollerWrapper.LatestEvents() require.NoError(t, err) require.Equal(t, 0, len(reqs)) require.Equal(t, 0, len(resps)) } func TestLogPollerWrapper_ErrorOnZeroAddresses(t *testing.T) { - lp, lpWrapper, client := setUp(t, 100_000) // check only once - lp.On("LatestBlock").Return(logpoller.LogPollerBlock{BlockNumber: int64(100)}, nil) + t.Parallel() + setup := setUp(t, 100_000) // check only once + setup.LogPoller.On("LatestBlock").Return(logpoller.LogPollerBlock{BlockNumber: int64(100)}, nil) - client.On("CallContract", mock.Anything, mock.Anything, mock.Anything).Return(addr(t, "00"), nil) + setup.Client.On("CallContract", mock.Anything, mock.Anything, mock.Anything).Return(addr("00")) - servicetest.Run(t, lpWrapper) - _, _, err := lpWrapper.LatestEvents() + servicetest.Run(t, setup.LogPollerWrapper) + _, _, err := setup.LogPollerWrapper.LatestEvents() require.Error(t, err) } func TestLogPollerWrapper_LatestEvents_ReorgHandlingV1(t *testing.T) { - lp, lpWrapper, client := setUp(t, 100_000) - lp.On("LatestBlock").Return(logpoller.LogPollerBlock{BlockNumber: int64(100)}, nil) - client.On("CallContract", mock.Anything, ethereum.CallMsg{ // getContractById - To: &routerAddressHex, + t.Parallel() + setup := setUp(t, 100_000) + setup.LogPoller.On("LatestBlock").Return(logpoller.LogPollerBlock{BlockNumber: int64(100)}, nil) + setup.Client.On("CallContract", mock.Anything, ethereum.CallMsg{ // getContractById + To: &setup.RouterAddress, Data: []uint8{0xa9, 0xc9, 0xa9, 0x18, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, - }, mock.Anything).Return(coordinatorAddressBytes, nil) - client.On("CallContract", mock.Anything, ethereum.CallMsg{ // getProposedContractById - To: &routerAddressHex, + }, mock.Anything).Return(setup.CoordinatorAddressBytes, nil) + setup.Client.On("CallContract", mock.Anything, ethereum.CallMsg{ // getProposedContractById + To: &setup.RouterAddress, Data: []uint8{0x6a, 0x22, 0x15, 0xde, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, - }, mock.Anything).Return(addr(t, "00"), nil) + }, mock.Anything).Return(addr("00")) typeAndVersionResponse, err := encodeTypeAndVersion(CoordinatorContractV100) require.NoError(t, err) - client.On("CallContract", mock.Anything, ethereum.CallMsg{ // typeAndVersion - To: &coordinatorAddressHex, + setup.Client.On("CallContract", mock.Anything, ethereum.CallMsg{ // typeAndVersion + To: &setup.CoordinatorAddress, Data: hexutil.MustDecode("0x181f5a77"), }, mock.Anything).Return(typeAndVersionResponse, nil) - lp.On("RegisterFilter", mock.Anything).Return(nil) + setup.LogPoller.On("RegisterFilter", mock.Anything).Return(nil) subscriber := newSubscriber(1) - lpWrapper.SubscribeToUpdates("mock_subscriber", subscriber) + setup.LogPollerWrapper.SubscribeToUpdates("mock_subscriber", subscriber) mockedLog := getMockedRequestLogV1(t) // All logPoller queries for responses return none - lp.On("Logs", mock.Anything, mock.Anything, functions_coordinator_1_1_0.FunctionsCoordinator110OracleResponse{}.Topic(), mock.Anything).Return([]logpoller.Log{}, nil) + setup.LogPoller.On("Logs", mock.Anything, mock.Anything, functions_coordinator_1_1_0.FunctionsCoordinator110OracleResponse{}.Topic(), mock.Anything).Return([]logpoller.Log{}, nil) // On the first logPoller query for requests, the request log appears - lp.On("Logs", mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return([]logpoller.Log{mockedLog}, nil).Once() + setup.LogPoller.On("Logs", mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return([]logpoller.Log{mockedLog}, nil).Once() // On the 2nd query, the request log disappears - lp.On("Logs", mock.Anything, mock.Anything, functions_coordinator_1_1_0.FunctionsCoordinator110OracleRequest{}.Topic(), mock.Anything).Return([]logpoller.Log{}, nil).Once() + setup.LogPoller.On("Logs", mock.Anything, mock.Anything, functions_coordinator_1_1_0.FunctionsCoordinator110OracleRequest{}.Topic(), mock.Anything).Return([]logpoller.Log{}, nil).Once() // On the 3rd query, the original request log appears again - lp.On("Logs", mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return([]logpoller.Log{mockedLog}, nil).Once() - - servicetest.Run(t, lpWrapper) - subscriber.updates.Wait() + setup.LogPoller.On("Logs", mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return([]logpoller.Log{mockedLog}, nil).Once() + + servicetest.Run(t, setup.LogPollerWrapper) + + done := make(chan struct{}) + go func() { + subscriber.updates.Wait() + close(done) + }() + + select { + case <-done: // subscriber.updates is 0 + break + case <-time.After(5 * time.Second): // Hit timeout. + t.Log("TestLogPollerWrapper_LatestEvents_ReorgHandlingV1: timeout") + t.FailNow() + } - oracleRequests, _, err := lpWrapper.LatestEvents() + oracleRequests, _, err := setup.LogPollerWrapper.LatestEvents() require.NoError(t, err) assert.Equal(t, 1, len(oracleRequests)) - oracleRequests, _, err = lpWrapper.LatestEvents() + oracleRequests, _, err = setup.LogPollerWrapper.LatestEvents() require.NoError(t, err) assert.Equal(t, 0, len(oracleRequests)) require.NoError(t, err) - oracleRequests, _, err = lpWrapper.LatestEvents() + oracleRequests, _, err = setup.LogPollerWrapper.LatestEvents() require.NoError(t, err) assert.Equal(t, 0, len(oracleRequests)) } func TestLogPollerWrapper_LatestEvents_ReorgHandlingV2(t *testing.T) { - lp, lpWrapper, client := setUp(t, 100_000) - lp.On("LatestBlock").Return(logpoller.LogPollerBlock{BlockNumber: int64(100)}, nil) - client.On("CallContract", mock.Anything, ethereum.CallMsg{ // getContractById - To: &routerAddressHex, + t.Parallel() + setup := setUp(t, 100_000) + setup.LogPoller.On("LatestBlock").Return(logpoller.LogPollerBlock{BlockNumber: int64(100)}, nil) + setup.Client.On("CallContract", mock.Anything, ethereum.CallMsg{ // getContractById + To: &setup.RouterAddress, Data: []uint8{0xa9, 0xc9, 0xa9, 0x18, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, - }, mock.Anything).Return(coordinatorAddressBytes, nil) - client.On("CallContract", mock.Anything, ethereum.CallMsg{ // getProposedContractById - To: &routerAddressHex, + }, mock.Anything).Return(setup.CoordinatorAddressBytes, nil) + setup.Client.On("CallContract", mock.Anything, ethereum.CallMsg{ // getProposedContractById + To: &setup.RouterAddress, Data: []uint8{0x6a, 0x22, 0x15, 0xde, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, - }, mock.Anything).Return(addr(t, "00"), nil) + }, mock.Anything).Return(addr("00")) typeAndVersionResponse, err := encodeTypeAndVersion(CoordinatorContractV200) require.NoError(t, err) - client.On("CallContract", mock.Anything, ethereum.CallMsg{ // typeAndVersion - To: &coordinatorAddressHex, + setup.Client.On("CallContract", mock.Anything, ethereum.CallMsg{ // typeAndVersion + To: &setup.CoordinatorAddress, Data: hexutil.MustDecode("0x181f5a77"), }, mock.Anything).Return(typeAndVersionResponse, nil) - lp.On("RegisterFilter", mock.Anything).Return(nil) + setup.LogPoller.On("RegisterFilter", mock.Anything).Return(nil) subscriber := newSubscriber(1) - lpWrapper.SubscribeToUpdates("mock_subscriber", subscriber) + setup.LogPollerWrapper.SubscribeToUpdates("mock_subscriber", subscriber) mockedLog := getMockedRequestLogV2(t) // All logPoller queries for responses return none - lp.On("Logs", mock.Anything, mock.Anything, functions_coordinator.FunctionsCoordinatorOracleResponse{}.Topic(), mock.Anything).Return([]logpoller.Log{}, nil) + setup.LogPoller.On("Logs", mock.Anything, mock.Anything, functions_coordinator.FunctionsCoordinatorOracleResponse{}.Topic(), mock.Anything).Return([]logpoller.Log{}, nil) // On the first logPoller query for requests, the request log appears - lp.On("Logs", mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return([]logpoller.Log{mockedLog}, nil).Once() + setup.LogPoller.On("Logs", mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return([]logpoller.Log{mockedLog}, nil).Once() // On the 2nd query, the request log disappears - lp.On("Logs", mock.Anything, mock.Anything, functions_coordinator.FunctionsCoordinatorOracleRequest{}.Topic(), mock.Anything).Return([]logpoller.Log{}, nil).Once() + setup.LogPoller.On("Logs", mock.Anything, mock.Anything, functions_coordinator.FunctionsCoordinatorOracleRequest{}.Topic(), mock.Anything).Return([]logpoller.Log{}, nil).Once() // On the 3rd query, the original request log appears again - lp.On("Logs", mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return([]logpoller.Log{mockedLog}, nil).Once() + setup.LogPoller.On("Logs", mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return([]logpoller.Log{mockedLog}, nil).Once() - servicetest.Run(t, lpWrapper) + servicetest.Run(t, setup.LogPollerWrapper) subscriber.updates.Wait() - oracleRequests, _, err := lpWrapper.LatestEvents() + oracleRequests, _, err := setup.LogPollerWrapper.LatestEvents() require.NoError(t, err) assert.Equal(t, 1, len(oracleRequests)) - oracleRequests, _, err = lpWrapper.LatestEvents() + oracleRequests, _, err = setup.LogPollerWrapper.LatestEvents() require.NoError(t, err) assert.Equal(t, 0, len(oracleRequests)) require.NoError(t, err) - oracleRequests, _, err = lpWrapper.LatestEvents() + oracleRequests, _, err = setup.LogPollerWrapper.LatestEvents() require.NoError(t, err) assert.Equal(t, 0, len(oracleRequests)) } func TestLogPollerWrapper_FilterPreviouslyDetectedEvents_TruncatesLogs(t *testing.T) { - _, lpWrapper, _ := setUp(t, 100_000) + t.Parallel() + setup := setUp(t, 100_000) inputLogs := make([]logpoller.Log, maxLogsToProcess+100) for i := 0; i < 1100; i++ { inputLogs[i] = getMockedRequestLogV1(t) } - functionsLpWrapper := lpWrapper.(*logPollerWrapper) + functionsLpWrapper := setup.LogPollerWrapper.(*logPollerWrapper) mockedDetectedEvents := detectedEvents{isPreviouslyDetected: make(map[[32]byte]struct{})} outputLogs := functionsLpWrapper.filterPreviouslyDetectedEvents(inputLogs, &mockedDetectedEvents, "request") @@ -301,12 +329,13 @@ func TestLogPollerWrapper_FilterPreviouslyDetectedEvents_TruncatesLogs(t *testin } func TestLogPollerWrapper_FilterPreviouslyDetectedEvents_SkipsInvalidLog(t *testing.T) { - _, lpWrapper, _ := setUp(t, 100_000) + t.Parallel() + setup := setUp(t, 100_000) inputLogs := []logpoller.Log{getMockedRequestLogV1(t)} inputLogs[0].Topics = [][]byte{[]byte("invalid topic")} mockedDetectedEvents := detectedEvents{isPreviouslyDetected: make(map[[32]byte]struct{})} - functionsLpWrapper := lpWrapper.(*logPollerWrapper) + functionsLpWrapper := setup.LogPollerWrapper.(*logPollerWrapper) outputLogs := functionsLpWrapper.filterPreviouslyDetectedEvents(inputLogs, &mockedDetectedEvents, "request") assert.Equal(t, 0, len(outputLogs)) @@ -315,7 +344,8 @@ func TestLogPollerWrapper_FilterPreviouslyDetectedEvents_SkipsInvalidLog(t *test } func TestLogPollerWrapper_FilterPreviouslyDetectedEvents_FiltersPreviouslyDetectedEvent(t *testing.T) { - _, lpWrapper, _ := setUp(t, 100_000) + t.Parallel() + setup := setUp(t, 100_000) mockedRequestLog := getMockedRequestLogV1(t) inputLogs := []logpoller.Log{mockedRequestLog} var mockedRequestId [32]byte @@ -331,7 +361,7 @@ func TestLogPollerWrapper_FilterPreviouslyDetectedEvents_FiltersPreviouslyDetect timeDetected: time.Now().Add(-time.Second * time.Duration(logPollerCacheDurationSecDefault+1)), } - functionsLpWrapper := lpWrapper.(*logPollerWrapper) + functionsLpWrapper := setup.LogPollerWrapper.(*logPollerWrapper) outputLogs := functionsLpWrapper.filterPreviouslyDetectedEvents(inputLogs, &mockedDetectedEvents, "request") assert.Equal(t, 0, len(outputLogs)) From 753122ab605792de729654dff33b4d443d7c1059 Mon Sep 17 00:00:00 2001 From: Gabriel Paradiso Date: Tue, 20 Feb 2024 13:11:04 +0100 Subject: [PATCH 12/19] chore: internal abitypes to avoid pkg variables and init function --- .../relay/evm/functions/coordinator_v1.go | 28 +++--- .../relay/evm/functions/coordinator_v2.go | 30 ++++--- .../relay/evm/functions/logpoller_wrapper.go | 86 +++++++++++-------- 3 files changed, 79 insertions(+), 65 deletions(-) diff --git a/core/services/relay/evm/functions/coordinator_v1.go b/core/services/relay/evm/functions/coordinator_v1.go index 683d39ddd1a..870c719ac31 100644 --- a/core/services/relay/evm/functions/coordinator_v1.go +++ b/core/services/relay/evm/functions/coordinator_v1.go @@ -14,16 +14,18 @@ import ( ) type CoordinatorV1 struct { - address common.Address + address common.Address + abiTypes *abiTypes client client.Client logPoller logpoller.LogPoller lggr logger.Logger } -func NewCoordinatorV1(address common.Address, client client.Client, logPoller logpoller.LogPoller, lggr logger.Logger) *CoordinatorV1 { +func NewCoordinatorV1(address common.Address, abiTypes *abiTypes, client client.Client, logPoller logpoller.LogPoller, lggr logger.Logger) *CoordinatorV1 { return &CoordinatorV1{ address: address, + abiTypes: abiTypes, client: client, logPoller: logPoller, lggr: lggr, @@ -75,17 +77,17 @@ func (c *CoordinatorV1) LogsToRequests(requestLogs []logpoller.Log) ([]evmRelayT } commitmentABIV1 := abi.Arguments{ - {Type: bytes32Type}, // RequestId - {Type: addressType}, // Coordinator - {Type: uint96Type}, // EstimatedTotalCostJuels - {Type: addressType}, // Client - {Type: uint64Type}, // SubscriptionId - {Type: uint32Type}, // CallbackGasLimit - {Type: uint72Type}, // AdminFee - {Type: uint72Type}, // DonFee - {Type: uint40Type}, // GasOverheadBeforeCallback - {Type: uint40Type}, // GasOverheadAfterCallback - {Type: uint32Type}, // TimeoutTimestamp + {Type: c.abiTypes.bytes32Type}, // RequestId + {Type: c.abiTypes.addressType}, // Coordinator + {Type: c.abiTypes.uint96Type}, // EstimatedTotalCostJuels + {Type: c.abiTypes.addressType}, // Client + {Type: c.abiTypes.uint64Type}, // SubscriptionId + {Type: c.abiTypes.uint32Type}, // CallbackGasLimit + {Type: c.abiTypes.uint72Type}, // AdminFee + {Type: c.abiTypes.uint72Type}, // DonFee + {Type: c.abiTypes.uint40Type}, // GasOverheadBeforeCallback + {Type: c.abiTypes.uint40Type}, // GasOverheadAfterCallback + {Type: c.abiTypes.uint32Type}, // TimeoutTimestamp } commitmentBytesV1, err := commitmentABIV1.Pack( diff --git a/core/services/relay/evm/functions/coordinator_v2.go b/core/services/relay/evm/functions/coordinator_v2.go index 4189e575b2a..dae7b5dd0e5 100644 --- a/core/services/relay/evm/functions/coordinator_v2.go +++ b/core/services/relay/evm/functions/coordinator_v2.go @@ -14,16 +14,18 @@ import ( ) type CoordinatorV2 struct { - address common.Address + address common.Address + abiTypes *abiTypes client client.Client logPoller logpoller.LogPoller lggr logger.Logger } -func NewCoordinatorV2(address common.Address, client client.Client, logPoller logpoller.LogPoller, lggr logger.Logger) *CoordinatorV2 { +func NewCoordinatorV2(address common.Address, abiTypes *abiTypes, client client.Client, logPoller logpoller.LogPoller, lggr logger.Logger) *CoordinatorV2 { return &CoordinatorV2{ address: address, + abiTypes: abiTypes, client: client, logPoller: logPoller, lggr: lggr, @@ -72,18 +74,18 @@ func (c *CoordinatorV2) LogsToRequests(requestLogs []logpoller.Log) ([]evmRelayT } commitmentABIV2 := abi.Arguments{ - {Type: bytes32Type}, // RequestId - {Type: addressType}, // Coordinator - {Type: uint96Type}, // EstimatedTotalCostJuels - {Type: addressType}, // Client - {Type: uint64Type}, // SubscriptionId - {Type: uint32Type}, // CallbackGasLimit - {Type: uint72Type}, // AdminFee - {Type: uint72Type}, // DonFee - {Type: uint40Type}, // GasOverheadBeforeCallback - {Type: uint40Type}, // GasOverheadAfterCallback - {Type: uint32Type}, // TimeoutTimestamp - {Type: uint72Type}, // OperationFee + {Type: c.abiTypes.bytes32Type}, // RequestId + {Type: c.abiTypes.addressType}, // Coordinator + {Type: c.abiTypes.uint96Type}, // EstimatedTotalCostJuels + {Type: c.abiTypes.addressType}, // Client + {Type: c.abiTypes.uint64Type}, // SubscriptionId + {Type: c.abiTypes.uint32Type}, // CallbackGasLimit + {Type: c.abiTypes.uint72Type}, // AdminFee + {Type: c.abiTypes.uint72Type}, // DonFee + {Type: c.abiTypes.uint40Type}, // GasOverheadBeforeCallback + {Type: c.abiTypes.uint40Type}, // GasOverheadAfterCallback + {Type: c.abiTypes.uint32Type}, // TimeoutTimestamp + {Type: c.abiTypes.uint72Type}, // OperationFee } commitmentBytesV2, err := commitmentABIV2.Pack( diff --git a/core/services/relay/evm/functions/logpoller_wrapper.go b/core/services/relay/evm/functions/logpoller_wrapper.go index a374f01fa9e..bfd05917cac 100644 --- a/core/services/relay/evm/functions/logpoller_wrapper.go +++ b/core/services/relay/evm/functions/logpoller_wrapper.go @@ -40,6 +40,7 @@ type logPollerWrapper struct { logPollerCacheDurationSec int64 detectedRequests detectedEvents detectedResponses detectedEvents + abiTypes *abiTypes mu sync.Mutex closeWait sync.WaitGroup stopCh services.StopChan @@ -56,6 +57,16 @@ type detectedEvents struct { detectedEventsOrdered []detectedEvent } +type abiTypes struct { + uint32Type abi.Type + uint40Type abi.Type + uint64Type abi.Type + uint72Type abi.Type + uint96Type abi.Type + addressType abi.Type + bytes32Type abi.Type +} + type Coordinator interface { Address() common.Address RegisterFilters() error @@ -72,23 +83,6 @@ const logPollerCacheDurationSecDefault = 300 const pastBlocksToPollDefault = 50 const maxLogsToProcess = 1000 -var ( - uint32Type abi.Type - uint40Type abi.Type - uint64Type abi.Type - uint72Type abi.Type - uint96Type abi.Type - addressType abi.Type - bytes32Type abi.Type -) - -func init() { - err := initAbiTypes() - if err != nil { - panic(err) - } -} - var _ evmRelayTypes.LogPollerWrapper = &logPollerWrapper{} func NewLogPollerWrapper(routerContractAddress common.Address, pluginConfig config.PluginConfig, client client.Client, logPoller logpoller.LogPoller, lggr logger.Logger) (evmRelayTypes.LogPollerWrapper, error) { @@ -126,6 +120,11 @@ func NewLogPollerWrapper(routerContractAddress common.Address, pluginConfig conf return nil, errors.Errorf("invalid config: number of required confirmation blocks >= pastBlocksToPoll") } + abiTypes, err := initAbiTypes() + if err != nil { + return nil, err + } + return &logPollerWrapper{ routerContract: routerContract, pluginConfig: pluginConfig, @@ -135,6 +134,7 @@ func NewLogPollerWrapper(routerContractAddress common.Address, pluginConfig conf logPollerCacheDurationSec: logPollerCacheDurationSec, detectedRequests: detectedEvents{isPreviouslyDetected: make(map[[32]byte]struct{})}, detectedResponses: detectedEvents{isPreviouslyDetected: make(map[[32]byte]struct{})}, + abiTypes: abiTypes, logPoller: logPoller, client: client, subscribers: make(map[string]evmRelayTypes.RouteUpdateSubscriber), @@ -399,9 +399,9 @@ func (l *logPollerWrapper) handleRouteUpdate(activeCoordinatorAddress common.Add var activeCoordinator Coordinator switch { case strings.Contains(activeCoordinatorTypeAndVersion, FUNCTIONS_COORDINATOR_VERSION_1_SUBSTRING): - activeCoordinator = NewCoordinatorV1(activeCoordinatorAddress, l.client, l.logPoller, l.lggr) + activeCoordinator = NewCoordinatorV1(activeCoordinatorAddress, l.abiTypes, l.client, l.logPoller, l.lggr) case strings.Contains(activeCoordinatorTypeAndVersion, FUNCTIONS_COORDINATOR_VERSION_2_SUBSTRING): - activeCoordinator = NewCoordinatorV2(activeCoordinatorAddress, l.client, l.logPoller, l.lggr) + activeCoordinator = NewCoordinatorV2(activeCoordinatorAddress, l.abiTypes, l.client, l.logPoller, l.lggr) default: l.lggr.Errorf("LogPollerWrapper: Invalid active coordinator type and version: %q", activeCoordinatorTypeAndVersion) return @@ -427,11 +427,11 @@ func (l *logPollerWrapper) handleRouteUpdate(activeCoordinatorAddress common.Add switch { // proposedCoordinatorTypeAndVersion can be empty due to an empty proposedCoordinatorAddress case proposedCoordinatorTypeAndVersion == "": - proposedCoordinator = NewCoordinatorV1(proposedCoordinatorAddress, l.client, l.logPoller, l.lggr) + proposedCoordinator = NewCoordinatorV1(proposedCoordinatorAddress, l.abiTypes, l.client, l.logPoller, l.lggr) case strings.Contains(proposedCoordinatorTypeAndVersion, FUNCTIONS_COORDINATOR_VERSION_1_SUBSTRING): - proposedCoordinator = NewCoordinatorV1(proposedCoordinatorAddress, l.client, l.logPoller, l.lggr) + proposedCoordinator = NewCoordinatorV1(proposedCoordinatorAddress, l.abiTypes, l.client, l.logPoller, l.lggr) case strings.Contains(proposedCoordinatorTypeAndVersion, FUNCTIONS_COORDINATOR_VERSION_2_SUBSTRING): - proposedCoordinator = NewCoordinatorV2(proposedCoordinatorAddress, l.client, l.logPoller, l.lggr) + proposedCoordinator = NewCoordinatorV2(proposedCoordinatorAddress, l.abiTypes, l.client, l.logPoller, l.lggr) } @@ -453,36 +453,46 @@ func (l *logPollerWrapper) handleRouteUpdate(activeCoordinatorAddress common.Add } } -func initAbiTypes() error { +func initAbiTypes() (*abiTypes, error) { var err error - uint32Type, err = abi.NewType("uint32", "uint32", nil) + uint32Type, err := abi.NewType("uint32", "uint32", nil) if err != nil { - return fmt.Errorf("LogsToRequests: failed to initialize uint32Type type: %w", err) + return nil, fmt.Errorf("LogsToRequests: failed to initialize uint32Type type: %w", err) } - uint40Type, err = abi.NewType("uint40", "uint40", nil) + uint40Type, err := abi.NewType("uint40", "uint40", nil) if err != nil { - return fmt.Errorf("LogsToRequests: failed to initialize uint40Type type: %w", err) + return nil, fmt.Errorf("LogsToRequests: failed to initialize uint40Type type: %w", err) } - uint64Type, err = abi.NewType("uint64", "uint64", nil) + uint64Type, err := abi.NewType("uint64", "uint64", nil) if err != nil { - return fmt.Errorf("LogsToRequests: failed to initialize uint64Type type: %w", err) + return nil, fmt.Errorf("LogsToRequests: failed to initialize uint64Type type: %w", err) } - uint72Type, err = abi.NewType("uint72", "uint72", nil) + uint72Type, err := abi.NewType("uint72", "uint72", nil) if err != nil { - return fmt.Errorf("LogsToRequests: failed to initialize uint72Type type: %w", err) + return nil, fmt.Errorf("LogsToRequests: failed to initialize uint72Type type: %w", err) } - uint96Type, err = abi.NewType("uint96", "uint96", nil) + uint96Type, err := abi.NewType("uint96", "uint96", nil) if err != nil { - return fmt.Errorf("LogsToRequests: failed to initialize uint96Type type: %w", err) + return nil, fmt.Errorf("LogsToRequests: failed to initialize uint96Type type: %w", err) } - addressType, err = abi.NewType("address", "address", nil) + addressType, err := abi.NewType("address", "address", nil) if err != nil { - return fmt.Errorf("LogsToRequests: failed to initialize addressType type: %w", err) + return nil, fmt.Errorf("LogsToRequests: failed to initialize addressType type: %w", err) } - bytes32Type, err = abi.NewType("bytes32", "bytes32", nil) + bytes32Type, err := abi.NewType("bytes32", "bytes32", nil) if err != nil { - return fmt.Errorf("LogsToRequests: failed to initialize bytes32Type type: %w", err) + return nil, fmt.Errorf("LogsToRequests: failed to initialize bytes32Type type: %w", err) + } + + at := &abiTypes{ + uint32Type: uint32Type, + uint40Type: uint40Type, + uint64Type: uint64Type, + uint72Type: uint72Type, + uint96Type: uint96Type, + addressType: addressType, + bytes32Type: bytes32Type, } - return nil + return at, nil } From 688b5f467192386ff6e7fd66672ab1e6428844b9 Mon Sep 17 00:00:00 2001 From: Gabriel Paradiso Date: Tue, 20 Feb 2024 15:55:11 +0100 Subject: [PATCH 13/19] chore: reuse abi.Arguments to remove duplication --- .../relay/evm/functions/coordinator_v1.go | 24 ++++------------- .../relay/evm/functions/coordinator_v2.go | 25 ++++------------- .../relay/evm/functions/logpoller_wrapper.go | 27 +++++++++++++++---- 3 files changed, 32 insertions(+), 44 deletions(-) diff --git a/core/services/relay/evm/functions/coordinator_v1.go b/core/services/relay/evm/functions/coordinator_v1.go index 870c719ac31..b440723b747 100644 --- a/core/services/relay/evm/functions/coordinator_v1.go +++ b/core/services/relay/evm/functions/coordinator_v1.go @@ -14,18 +14,18 @@ import ( ) type CoordinatorV1 struct { - address common.Address - abiTypes *abiTypes + address common.Address + abiArgs abi.Arguments client client.Client logPoller logpoller.LogPoller lggr logger.Logger } -func NewCoordinatorV1(address common.Address, abiTypes *abiTypes, client client.Client, logPoller logpoller.LogPoller, lggr logger.Logger) *CoordinatorV1 { +func NewCoordinatorV1(address common.Address, abiArgs abi.Arguments, client client.Client, logPoller logpoller.LogPoller, lggr logger.Logger) *CoordinatorV1 { return &CoordinatorV1{ address: address, - abiTypes: abiTypes, + abiArgs: abiArgs, client: client, logPoller: logPoller, lggr: lggr, @@ -76,21 +76,7 @@ func (c *CoordinatorV1) LogsToRequests(requestLogs []logpoller.Log) ([]evmRelayT continue } - commitmentABIV1 := abi.Arguments{ - {Type: c.abiTypes.bytes32Type}, // RequestId - {Type: c.abiTypes.addressType}, // Coordinator - {Type: c.abiTypes.uint96Type}, // EstimatedTotalCostJuels - {Type: c.abiTypes.addressType}, // Client - {Type: c.abiTypes.uint64Type}, // SubscriptionId - {Type: c.abiTypes.uint32Type}, // CallbackGasLimit - {Type: c.abiTypes.uint72Type}, // AdminFee - {Type: c.abiTypes.uint72Type}, // DonFee - {Type: c.abiTypes.uint40Type}, // GasOverheadBeforeCallback - {Type: c.abiTypes.uint40Type}, // GasOverheadAfterCallback - {Type: c.abiTypes.uint32Type}, // TimeoutTimestamp - } - - commitmentBytesV1, err := commitmentABIV1.Pack( + commitmentBytesV1, err := c.abiArgs.Pack( oracleRequest.Commitment.RequestId, oracleRequest.Commitment.Coordinator, oracleRequest.Commitment.EstimatedTotalCostJuels, diff --git a/core/services/relay/evm/functions/coordinator_v2.go b/core/services/relay/evm/functions/coordinator_v2.go index dae7b5dd0e5..29fc6b4b9be 100644 --- a/core/services/relay/evm/functions/coordinator_v2.go +++ b/core/services/relay/evm/functions/coordinator_v2.go @@ -14,18 +14,18 @@ import ( ) type CoordinatorV2 struct { - address common.Address - abiTypes *abiTypes + address common.Address + abiArgs abi.Arguments client client.Client logPoller logpoller.LogPoller lggr logger.Logger } -func NewCoordinatorV2(address common.Address, abiTypes *abiTypes, client client.Client, logPoller logpoller.LogPoller, lggr logger.Logger) *CoordinatorV2 { +func NewCoordinatorV2(address common.Address, abiArgs abi.Arguments, client client.Client, logPoller logpoller.LogPoller, lggr logger.Logger) *CoordinatorV2 { return &CoordinatorV2{ address: address, - abiTypes: abiTypes, + abiArgs: abiArgs, client: client, logPoller: logPoller, lggr: lggr, @@ -73,22 +73,7 @@ func (c *CoordinatorV2) LogsToRequests(requestLogs []logpoller.Log) ([]evmRelayT continue } - commitmentABIV2 := abi.Arguments{ - {Type: c.abiTypes.bytes32Type}, // RequestId - {Type: c.abiTypes.addressType}, // Coordinator - {Type: c.abiTypes.uint96Type}, // EstimatedTotalCostJuels - {Type: c.abiTypes.addressType}, // Client - {Type: c.abiTypes.uint64Type}, // SubscriptionId - {Type: c.abiTypes.uint32Type}, // CallbackGasLimit - {Type: c.abiTypes.uint72Type}, // AdminFee - {Type: c.abiTypes.uint72Type}, // DonFee - {Type: c.abiTypes.uint40Type}, // GasOverheadBeforeCallback - {Type: c.abiTypes.uint40Type}, // GasOverheadAfterCallback - {Type: c.abiTypes.uint32Type}, // TimeoutTimestamp - {Type: c.abiTypes.uint72Type}, // OperationFee - } - - commitmentBytesV2, err := commitmentABIV2.Pack( + commitmentBytesV2, err := c.abiArgs.Pack( oracleRequest.Commitment.RequestId, oracleRequest.Commitment.Coordinator, oracleRequest.Commitment.EstimatedTotalCostJuels, diff --git a/core/services/relay/evm/functions/logpoller_wrapper.go b/core/services/relay/evm/functions/logpoller_wrapper.go index bfd05917cac..d6dcf110074 100644 --- a/core/services/relay/evm/functions/logpoller_wrapper.go +++ b/core/services/relay/evm/functions/logpoller_wrapper.go @@ -380,6 +380,23 @@ func (l *logPollerWrapper) handleRouteUpdate(activeCoordinatorAddress common.Add l.mu.Lock() defer l.mu.Unlock() + commitmentABIV1 := abi.Arguments{ + {Type: l.abiTypes.bytes32Type}, // RequestId + {Type: l.abiTypes.addressType}, // Coordinator + {Type: l.abiTypes.uint96Type}, // EstimatedTotalCostJuels + {Type: l.abiTypes.addressType}, // Client + {Type: l.abiTypes.uint64Type}, // SubscriptionId + {Type: l.abiTypes.uint32Type}, // CallbackGasLimit + {Type: l.abiTypes.uint72Type}, // AdminFee + {Type: l.abiTypes.uint72Type}, // DonFee + {Type: l.abiTypes.uint40Type}, // GasOverheadBeforeCallback + {Type: l.abiTypes.uint40Type}, // GasOverheadAfterCallback + {Type: l.abiTypes.uint32Type}, // TimeoutTimestamp + } + + commitmentABIV2 := append(commitmentABIV1, + abi.Argument{Type: l.abiTypes.uint72Type}) // OperationFee + if activeCoordinatorAddress == (common.Address{}) { l.lggr.Error("LogPollerWrapper: cannot update activeCoordinator to zero address") return @@ -399,9 +416,9 @@ func (l *logPollerWrapper) handleRouteUpdate(activeCoordinatorAddress common.Add var activeCoordinator Coordinator switch { case strings.Contains(activeCoordinatorTypeAndVersion, FUNCTIONS_COORDINATOR_VERSION_1_SUBSTRING): - activeCoordinator = NewCoordinatorV1(activeCoordinatorAddress, l.abiTypes, l.client, l.logPoller, l.lggr) + activeCoordinator = NewCoordinatorV1(activeCoordinatorAddress, commitmentABIV1, l.client, l.logPoller, l.lggr) case strings.Contains(activeCoordinatorTypeAndVersion, FUNCTIONS_COORDINATOR_VERSION_2_SUBSTRING): - activeCoordinator = NewCoordinatorV2(activeCoordinatorAddress, l.abiTypes, l.client, l.logPoller, l.lggr) + activeCoordinator = NewCoordinatorV2(activeCoordinatorAddress, commitmentABIV2, l.client, l.logPoller, l.lggr) default: l.lggr.Errorf("LogPollerWrapper: Invalid active coordinator type and version: %q", activeCoordinatorTypeAndVersion) return @@ -427,11 +444,11 @@ func (l *logPollerWrapper) handleRouteUpdate(activeCoordinatorAddress common.Add switch { // proposedCoordinatorTypeAndVersion can be empty due to an empty proposedCoordinatorAddress case proposedCoordinatorTypeAndVersion == "": - proposedCoordinator = NewCoordinatorV1(proposedCoordinatorAddress, l.abiTypes, l.client, l.logPoller, l.lggr) + proposedCoordinator = NewCoordinatorV1(proposedCoordinatorAddress, commitmentABIV1, l.client, l.logPoller, l.lggr) case strings.Contains(proposedCoordinatorTypeAndVersion, FUNCTIONS_COORDINATOR_VERSION_1_SUBSTRING): - proposedCoordinator = NewCoordinatorV1(proposedCoordinatorAddress, l.abiTypes, l.client, l.logPoller, l.lggr) + proposedCoordinator = NewCoordinatorV1(proposedCoordinatorAddress, commitmentABIV1, l.client, l.logPoller, l.lggr) case strings.Contains(proposedCoordinatorTypeAndVersion, FUNCTIONS_COORDINATOR_VERSION_2_SUBSTRING): - proposedCoordinator = NewCoordinatorV2(proposedCoordinatorAddress, l.abiTypes, l.client, l.logPoller, l.lggr) + proposedCoordinator = NewCoordinatorV2(proposedCoordinatorAddress, commitmentABIV2, l.client, l.logPoller, l.lggr) } From bcc39f265d5e5514d86e72242212b373487b3da5 Mon Sep 17 00:00:00 2001 From: Gabriel Paradiso Date: Tue, 20 Feb 2024 16:14:12 +0100 Subject: [PATCH 14/19] chore: rollback func addr() change --- .../evm/functions/logpoller_wrapper_test.go | 25 ++++++++----------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/core/services/relay/evm/functions/logpoller_wrapper_test.go b/core/services/relay/evm/functions/logpoller_wrapper_test.go index 9087356c65b..9e7aae351da 100644 --- a/core/services/relay/evm/functions/logpoller_wrapper_test.go +++ b/core/services/relay/evm/functions/logpoller_wrapper_test.go @@ -55,12 +55,10 @@ func newSubscriber(expectedCalls int) *subscriber { return sub } -func addr(lastByte string) ([]byte, error) { +func addr(t *testing.T, lastByte string) []byte { contractAddr, err := hex.DecodeString("00000000000000000000000000000000000000000000000000000000000000" + lastByte) - if err != nil { - return []byte{}, err - } - return contractAddr, nil + require.NoError(t, err) + return contractAddr } type setupResponse struct { @@ -81,12 +79,11 @@ func setUp(t *testing.T, updateFrequencySec uint32) setupResponse { ContractUpdateCheckFrequencySec: updateFrequencySec, ContractVersion: 1, } - routerAddressBytes, err := addr("01") - require.NoError(t, err) + routerAddressBytes := addr(t, "01") s.RouterAddress = common.BytesToAddress(routerAddressBytes) - s.CoordinatorAddressBytes, err = addr("02") - require.NoError(t, err) + s.CoordinatorAddressBytes = addr(t, "02") s.CoordinatorAddress = common.BytesToAddress(s.CoordinatorAddressBytes) + var err error s.LogPollerWrapper, err = NewLogPollerWrapper(s.RouterAddress, config, s.Client, s.LogPoller, lggr) require.NoError(t, err) @@ -142,7 +139,7 @@ func TestLogPollerWrapper_SingleSubscriberEmptyEvents_CoordinatorV1(t *testing.T setup.Client.On("CallContract", mock.Anything, ethereum.CallMsg{ // getProposedContractById To: &setup.RouterAddress, Data: []uint8{0x6a, 0x22, 0x15, 0xde, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, - }, mock.Anything).Return(addr("00")) + }, mock.Anything).Return(addr(t, "00"), nil) setup.LogPoller.On("RegisterFilter", mock.Anything).Return(nil) typeAndVersionResponse, err := encodeTypeAndVersion(CoordinatorContractV100) require.NoError(t, err) @@ -174,7 +171,7 @@ func TestLogPollerWrapper_SingleSubscriberEmptyEvents_CoordinatorV2(t *testing.T setup.Client.On("CallContract", mock.Anything, ethereum.CallMsg{ // getProposedContractById To: &setup.RouterAddress, Data: []uint8{0x6a, 0x22, 0x15, 0xde, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, - }, mock.Anything).Return(addr("00")) + }, mock.Anything).Return(addr(t, "00"), nil) setup.LogPoller.On("RegisterFilter", mock.Anything).Return(nil) typeAndVersionResponse, err := encodeTypeAndVersion(CoordinatorContractV200) require.NoError(t, err) @@ -198,7 +195,7 @@ func TestLogPollerWrapper_ErrorOnZeroAddresses(t *testing.T) { setup := setUp(t, 100_000) // check only once setup.LogPoller.On("LatestBlock").Return(logpoller.LogPollerBlock{BlockNumber: int64(100)}, nil) - setup.Client.On("CallContract", mock.Anything, mock.Anything, mock.Anything).Return(addr("00")) + setup.Client.On("CallContract", mock.Anything, mock.Anything, mock.Anything).Return(addr(t, "00"), nil) servicetest.Run(t, setup.LogPollerWrapper) _, _, err := setup.LogPollerWrapper.LatestEvents() @@ -216,7 +213,7 @@ func TestLogPollerWrapper_LatestEvents_ReorgHandlingV1(t *testing.T) { setup.Client.On("CallContract", mock.Anything, ethereum.CallMsg{ // getProposedContractById To: &setup.RouterAddress, Data: []uint8{0x6a, 0x22, 0x15, 0xde, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, - }, mock.Anything).Return(addr("00")) + }, mock.Anything).Return(addr(t, "00"), nil) typeAndVersionResponse, err := encodeTypeAndVersion(CoordinatorContractV100) require.NoError(t, err) setup.Client.On("CallContract", mock.Anything, ethereum.CallMsg{ // typeAndVersion @@ -275,7 +272,7 @@ func TestLogPollerWrapper_LatestEvents_ReorgHandlingV2(t *testing.T) { setup.Client.On("CallContract", mock.Anything, ethereum.CallMsg{ // getProposedContractById To: &setup.RouterAddress, Data: []uint8{0x6a, 0x22, 0x15, 0xde, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, - }, mock.Anything).Return(addr("00")) + }, mock.Anything).Return(addr(t, "00"), nil) typeAndVersionResponse, err := encodeTypeAndVersion(CoordinatorContractV200) require.NoError(t, err) setup.Client.On("CallContract", mock.Anything, ethereum.CallMsg{ // typeAndVersion From a1d93bccb75d4356f273acb53f9a1aaf51375c78 Mon Sep 17 00:00:00 2001 From: Gabriel Paradiso Date: Tue, 20 Feb 2024 16:29:35 +0100 Subject: [PATCH 15/19] chore: improve logs --- .../relay/evm/functions/logpoller_wrapper.go | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/core/services/relay/evm/functions/logpoller_wrapper.go b/core/services/relay/evm/functions/logpoller_wrapper.go index d6dcf110074..7d622a778ef 100644 --- a/core/services/relay/evm/functions/logpoller_wrapper.go +++ b/core/services/relay/evm/functions/logpoller_wrapper.go @@ -122,6 +122,7 @@ func NewLogPollerWrapper(routerContractAddress common.Address, pluginConfig conf abiTypes, err := initAbiTypes() if err != nil { + lggr.Errorf("failed to initialize abi types: %w", err) return nil, err } @@ -233,11 +234,13 @@ func (l *logPollerWrapper) LatestEvents() ([]evmRelayTypes.OracleRequest, []evmR l.lggr.Debugw("LatestEvents: parsing logs", "nRequestLogs", len(requestLogs), "nResponseLogs", len(responseLogs), "coordinatorAddress", coordinator.Address().Hex()) requests, err := coordinator.LogsToRequests(requestLogs) if err != nil { + l.lggr.Errorf("LatestEvents: fetched oracle request: %w", err) return nil, nil, err } resultsReq = append(resultsReq, requests...) responses, err := coordinator.LogsToResponses(responseLogs) if err != nil { + l.lggr.Errorf("LatestEvents: fetched oracle response: %w", err) return nil, nil, err } resultsResp = append(resultsResp, responses...) @@ -474,31 +477,31 @@ func initAbiTypes() (*abiTypes, error) { var err error uint32Type, err := abi.NewType("uint32", "uint32", nil) if err != nil { - return nil, fmt.Errorf("LogsToRequests: failed to initialize uint32Type type: %w", err) + return nil, fmt.Errorf("failed to initialize uint32Type type: %w", err) } uint40Type, err := abi.NewType("uint40", "uint40", nil) if err != nil { - return nil, fmt.Errorf("LogsToRequests: failed to initialize uint40Type type: %w", err) + return nil, fmt.Errorf("failed to initialize uint40Type type: %w", err) } uint64Type, err := abi.NewType("uint64", "uint64", nil) if err != nil { - return nil, fmt.Errorf("LogsToRequests: failed to initialize uint64Type type: %w", err) + return nil, fmt.Errorf("failed to initialize uint64Type type: %w", err) } uint72Type, err := abi.NewType("uint72", "uint72", nil) if err != nil { - return nil, fmt.Errorf("LogsToRequests: failed to initialize uint72Type type: %w", err) + return nil, fmt.Errorf("failed to initialize uint72Type type: %w", err) } uint96Type, err := abi.NewType("uint96", "uint96", nil) if err != nil { - return nil, fmt.Errorf("LogsToRequests: failed to initialize uint96Type type: %w", err) + return nil, fmt.Errorf("failed to initialize uint96Type type: %w", err) } addressType, err := abi.NewType("address", "address", nil) if err != nil { - return nil, fmt.Errorf("LogsToRequests: failed to initialize addressType type: %w", err) + return nil, fmt.Errorf("failed to initialize addressType type: %w", err) } bytes32Type, err := abi.NewType("bytes32", "bytes32", nil) if err != nil { - return nil, fmt.Errorf("LogsToRequests: failed to initialize bytes32Type type: %w", err) + return nil, fmt.Errorf("failed to initialize bytes32Type type: %w", err) } at := &abiTypes{ From 361893ff2c06cdfc2660dd1114def1d082289aec Mon Sep 17 00:00:00 2001 From: Gabriel Paradiso Date: Tue, 20 Feb 2024 16:46:01 +0100 Subject: [PATCH 16/19] fix: no changes if proposed is nil --- core/services/relay/evm/functions/logpoller_wrapper.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/services/relay/evm/functions/logpoller_wrapper.go b/core/services/relay/evm/functions/logpoller_wrapper.go index 7d622a778ef..996038e3525 100644 --- a/core/services/relay/evm/functions/logpoller_wrapper.go +++ b/core/services/relay/evm/functions/logpoller_wrapper.go @@ -406,7 +406,7 @@ func (l *logPollerWrapper) handleRouteUpdate(activeCoordinatorAddress common.Add } if (l.activeCoordinator != nil && l.activeCoordinator.Address() == activeCoordinatorAddress) && - (l.proposedCoordinator != nil && l.proposedCoordinator.Address() == proposedCoordinatorAddress) { + (l.proposedCoordinator == nil || l.proposedCoordinator.Address() == proposedCoordinatorAddress) { l.lggr.Debug("LogPollerWrapper: no changes to routes") return } From 4991b13f1cfdcc49162ee3c91058641c0d4d02a7 Mon Sep 17 00:00:00 2001 From: Gabriel Paradiso Date: Tue, 20 Feb 2024 17:24:11 +0100 Subject: [PATCH 17/19] chore: extract building of versioned coordinator to a helper function --- .../relay/evm/functions/logpoller_wrapper.go | 88 +++++++++---------- 1 file changed, 44 insertions(+), 44 deletions(-) diff --git a/core/services/relay/evm/functions/logpoller_wrapper.go b/core/services/relay/evm/functions/logpoller_wrapper.go index 996038e3525..af6ddaea8a6 100644 --- a/core/services/relay/evm/functions/logpoller_wrapper.go +++ b/core/services/relay/evm/functions/logpoller_wrapper.go @@ -383,23 +383,6 @@ func (l *logPollerWrapper) handleRouteUpdate(activeCoordinatorAddress common.Add l.mu.Lock() defer l.mu.Unlock() - commitmentABIV1 := abi.Arguments{ - {Type: l.abiTypes.bytes32Type}, // RequestId - {Type: l.abiTypes.addressType}, // Coordinator - {Type: l.abiTypes.uint96Type}, // EstimatedTotalCostJuels - {Type: l.abiTypes.addressType}, // Client - {Type: l.abiTypes.uint64Type}, // SubscriptionId - {Type: l.abiTypes.uint32Type}, // CallbackGasLimit - {Type: l.abiTypes.uint72Type}, // AdminFee - {Type: l.abiTypes.uint72Type}, // DonFee - {Type: l.abiTypes.uint40Type}, // GasOverheadBeforeCallback - {Type: l.abiTypes.uint40Type}, // GasOverheadAfterCallback - {Type: l.abiTypes.uint32Type}, // TimeoutTimestamp - } - - commitmentABIV2 := append(commitmentABIV1, - abi.Argument{Type: l.abiTypes.uint72Type}) // OperationFee - if activeCoordinatorAddress == (common.Address{}) { l.lggr.Error("LogPollerWrapper: cannot update activeCoordinator to zero address") return @@ -411,20 +394,9 @@ func (l *logPollerWrapper) handleRouteUpdate(activeCoordinatorAddress common.Add return } - activeCoordinatorTypeAndVersion, err := l.getTypeAndVersion(activeCoordinatorAddress) + activeCoordinator, err := l.buildVersionedCoordinator(activeCoordinatorAddress) if err != nil { - l.lggr.Errorf("LogPollerWrapper: failed to get active coordinatorTypeAndVersion: %w", err) - return - } - var activeCoordinator Coordinator - switch { - case strings.Contains(activeCoordinatorTypeAndVersion, FUNCTIONS_COORDINATOR_VERSION_1_SUBSTRING): - activeCoordinator = NewCoordinatorV1(activeCoordinatorAddress, commitmentABIV1, l.client, l.logPoller, l.lggr) - case strings.Contains(activeCoordinatorTypeAndVersion, FUNCTIONS_COORDINATOR_VERSION_2_SUBSTRING): - activeCoordinator = NewCoordinatorV2(activeCoordinatorAddress, commitmentABIV2, l.client, l.logPoller, l.lggr) - default: - l.lggr.Errorf("LogPollerWrapper: Invalid active coordinator type and version: %q", activeCoordinatorTypeAndVersion) - return + l.lggr.Errorf("LogPollerWrapper: %w", err) } if activeCoordinator != nil { @@ -437,24 +409,12 @@ func (l *logPollerWrapper) handleRouteUpdate(activeCoordinatorAddress common.Add l.lggr.Debugw("LogPollerWrapper: new routes", "activeCoordinator", activeCoordinator.Address().Hex()) } - proposedCoordinatorTypeAndVersion, err := l.getTypeAndVersion(proposedCoordinatorAddress) + proposedCoordinator, err := l.buildVersionedCoordinator(proposedCoordinatorAddress) if err != nil { - l.lggr.Errorf("LogPollerWrapper: failed to get proposed coordinatorTypeAndVersion: %w", err) + l.lggr.Errorf("LogPollerWrapper: %w", err) return } - var proposedCoordinator Coordinator - switch { - // proposedCoordinatorTypeAndVersion can be empty due to an empty proposedCoordinatorAddress - case proposedCoordinatorTypeAndVersion == "": - proposedCoordinator = NewCoordinatorV1(proposedCoordinatorAddress, commitmentABIV1, l.client, l.logPoller, l.lggr) - case strings.Contains(proposedCoordinatorTypeAndVersion, FUNCTIONS_COORDINATOR_VERSION_1_SUBSTRING): - proposedCoordinator = NewCoordinatorV1(proposedCoordinatorAddress, commitmentABIV1, l.client, l.logPoller, l.lggr) - case strings.Contains(proposedCoordinatorTypeAndVersion, FUNCTIONS_COORDINATOR_VERSION_2_SUBSTRING): - proposedCoordinator = NewCoordinatorV2(proposedCoordinatorAddress, commitmentABIV2, l.client, l.logPoller, l.lggr) - - } - if proposedCoordinator != nil { err = proposedCoordinator.RegisterFilters() if err != nil { @@ -473,6 +433,46 @@ func (l *logPollerWrapper) handleRouteUpdate(activeCoordinatorAddress common.Add } } +func (l *logPollerWrapper) buildVersionedCoordinator(coordinatorAddress common.Address) (Coordinator, error) { + + commitmentABIV1 := abi.Arguments{ + {Type: l.abiTypes.bytes32Type}, // RequestId + {Type: l.abiTypes.addressType}, // Coordinator + {Type: l.abiTypes.uint96Type}, // EstimatedTotalCostJuels + {Type: l.abiTypes.addressType}, // Client + {Type: l.abiTypes.uint64Type}, // SubscriptionId + {Type: l.abiTypes.uint32Type}, // CallbackGasLimit + {Type: l.abiTypes.uint72Type}, // AdminFee + {Type: l.abiTypes.uint72Type}, // DonFee + {Type: l.abiTypes.uint40Type}, // GasOverheadBeforeCallback + {Type: l.abiTypes.uint40Type}, // GasOverheadAfterCallback + {Type: l.abiTypes.uint32Type}, // TimeoutTimestamp + } + + commitmentABIV2 := append(commitmentABIV1, + abi.Argument{Type: l.abiTypes.uint72Type}) // OperationFee + + typeAndVersion, err := l.getTypeAndVersion(coordinatorAddress) + if err != nil { + return nil, fmt.Errorf("failed to get proposed coordinatorTypeAndVersion: %w", err) + } + + var coordinator Coordinator + switch { + // proposed coordinator TypeAndVersion can be empty due to an empty proposedCoordinatorAddress + case typeAndVersion == "": + coordinator = NewCoordinatorV1(coordinatorAddress, commitmentABIV1, l.client, l.logPoller, l.lggr) + case strings.Contains(typeAndVersion, FUNCTIONS_COORDINATOR_VERSION_1_SUBSTRING): + coordinator = NewCoordinatorV1(coordinatorAddress, commitmentABIV1, l.client, l.logPoller, l.lggr) + case strings.Contains(typeAndVersion, FUNCTIONS_COORDINATOR_VERSION_2_SUBSTRING): + coordinator = NewCoordinatorV2(coordinatorAddress, commitmentABIV2, l.client, l.logPoller, l.lggr) + default: + return nil, fmt.Errorf("LogPollerWrapper: Invalid coordinator type and version: %q", typeAndVersion) + } + + return coordinator, nil +} + func initAbiTypes() (*abiTypes, error) { var err error uint32Type, err := abi.NewType("uint32", "uint32", nil) From 2c47244318efe3a7b3e7f47ecbb5da6ae7ce5477 Mon Sep 17 00:00:00 2001 From: Gabriel Paradiso Date: Tue, 20 Feb 2024 17:46:30 +0100 Subject: [PATCH 18/19] chore: simplify Coordinator interface --- .../relay/evm/functions/coordinator_v1.go | 8 ++++---- .../relay/evm/functions/coordinator_v2.go | 8 ++++---- .../relay/evm/functions/logpoller_wrapper.go | 18 ++++-------------- 3 files changed, 12 insertions(+), 22 deletions(-) diff --git a/core/services/relay/evm/functions/coordinator_v1.go b/core/services/relay/evm/functions/coordinator_v1.go index b440723b747..32cd5f10866 100644 --- a/core/services/relay/evm/functions/coordinator_v1.go +++ b/core/services/relay/evm/functions/coordinator_v1.go @@ -52,12 +52,12 @@ func (c *CoordinatorV1) RegisterFilters() error { }) } -func (c *CoordinatorV1) OracleRequestLogTopic() (common.Hash, error) { - return functions_coordinator_1_1_0.FunctionsCoordinator110OracleRequest{}.Topic(), nil +func (c *CoordinatorV1) OracleRequestLogTopic() common.Hash { + return functions_coordinator_1_1_0.FunctionsCoordinator110OracleRequest{}.Topic() } -func (c *CoordinatorV1) OracleResponseLogTopic() (common.Hash, error) { - return functions_coordinator_1_1_0.FunctionsCoordinator110OracleResponse{}.Topic(), nil +func (c *CoordinatorV1) OracleResponseLogTopic() common.Hash { + return functions_coordinator_1_1_0.FunctionsCoordinator110OracleResponse{}.Topic() } func (c *CoordinatorV1) LogsToRequests(requestLogs []logpoller.Log) ([]evmRelayTypes.OracleRequest, error) { diff --git a/core/services/relay/evm/functions/coordinator_v2.go b/core/services/relay/evm/functions/coordinator_v2.go index 29fc6b4b9be..29edf4676a3 100644 --- a/core/services/relay/evm/functions/coordinator_v2.go +++ b/core/services/relay/evm/functions/coordinator_v2.go @@ -51,11 +51,11 @@ func (c *CoordinatorV2) RegisterFilters() error { Addresses: []common.Address{c.address}, }) } -func (c *CoordinatorV2) OracleRequestLogTopic() (common.Hash, error) { - return functions_coordinator.FunctionsCoordinatorOracleRequest{}.Topic(), nil +func (c *CoordinatorV2) OracleRequestLogTopic() common.Hash { + return functions_coordinator.FunctionsCoordinatorOracleRequest{}.Topic() } -func (c *CoordinatorV2) OracleResponseLogTopic() (common.Hash, error) { - return functions_coordinator.FunctionsCoordinatorOracleResponse{}.Topic(), nil +func (c *CoordinatorV2) OracleResponseLogTopic() common.Hash { + return functions_coordinator.FunctionsCoordinatorOracleResponse{}.Topic() } func (c *CoordinatorV2) LogsToRequests(requestLogs []logpoller.Log) ([]evmRelayTypes.OracleRequest, error) { var requests []evmRelayTypes.OracleRequest diff --git a/core/services/relay/evm/functions/logpoller_wrapper.go b/core/services/relay/evm/functions/logpoller_wrapper.go index af6ddaea8a6..40269a19bd5 100644 --- a/core/services/relay/evm/functions/logpoller_wrapper.go +++ b/core/services/relay/evm/functions/logpoller_wrapper.go @@ -70,8 +70,8 @@ type abiTypes struct { type Coordinator interface { Address() common.Address RegisterFilters() error - OracleRequestLogTopic() (common.Hash, error) - OracleResponseLogTopic() (common.Hash, error) + OracleRequestLogTopic() common.Hash + OracleResponseLogTopic() common.Hash LogsToRequests(requestLogs []logpoller.Log) ([]evmRelayTypes.OracleRequest, error) LogsToResponses(responseLogs []logpoller.Log) ([]evmRelayTypes.OracleResponse, error) } @@ -205,12 +205,7 @@ func (l *logPollerWrapper) LatestEvents() ([]evmRelayTypes.OracleRequest, []evmR for _, coordinator := range coordinators { requestEndBlock := latestBlockNum - l.requestBlockOffset - requestLogTopic, err := coordinator.OracleRequestLogTopic() - if err != nil { - l.lggr.Errorw("LatestEvents: ", err) - return nil, nil, err - } - requestLogs, err := l.logPoller.Logs(startBlockNum, requestEndBlock, requestLogTopic, coordinator.Address()) + requestLogs, err := l.logPoller.Logs(startBlockNum, requestEndBlock, coordinator.OracleRequestLogTopic(), coordinator.Address()) if err != nil { l.lggr.Errorw("LatestEvents: fetching request logs from LogPoller failed", "startBlock", startBlockNum, "endBlock", requestEndBlock) return nil, nil, err @@ -218,12 +213,7 @@ func (l *logPollerWrapper) LatestEvents() ([]evmRelayTypes.OracleRequest, []evmR l.lggr.Debugw("LatestEvents: fetched request logs", "nRequestLogs", len(requestLogs), "latestBlock", latest, "startBlock", startBlockNum, "endBlock", requestEndBlock) requestLogs = l.filterPreviouslyDetectedEvents(requestLogs, &l.detectedRequests, "requests") responseEndBlock := latestBlockNum - l.responseBlockOffset - responseLogTopic, err := coordinator.OracleResponseLogTopic() - if err != nil { - l.lggr.Errorw("LatestEvents: ", err) - return nil, nil, err - } - responseLogs, err := l.logPoller.Logs(startBlockNum, responseEndBlock, responseLogTopic, coordinator.Address()) + responseLogs, err := l.logPoller.Logs(startBlockNum, responseEndBlock, coordinator.OracleResponseLogTopic(), coordinator.Address()) if err != nil { l.lggr.Errorw("LatestEvents: fetching response logs from LogPoller failed", "startBlock", startBlockNum, "endBlock", responseEndBlock) return nil, nil, err From 6ace73463eed66e2483ab27979977803c7edb5ed Mon Sep 17 00:00:00 2001 From: Gabriel Paradiso Date: Tue, 20 Feb 2024 18:52:41 +0100 Subject: [PATCH 19/19] chore: extract FilterName to a const --- core/services/relay/evm/functions/coordinator_v1.go | 4 +++- core/services/relay/evm/functions/coordinator_v2.go | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/core/services/relay/evm/functions/coordinator_v1.go b/core/services/relay/evm/functions/coordinator_v1.go index 32cd5f10866..66240b3f8bd 100644 --- a/core/services/relay/evm/functions/coordinator_v1.go +++ b/core/services/relay/evm/functions/coordinator_v1.go @@ -13,6 +13,8 @@ import ( evmRelayTypes "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/types" ) +const logPollerWrapperV1 = "FunctionsLogPollerWrapperV1" + type CoordinatorV1 struct { address common.Address abiArgs abi.Arguments @@ -43,7 +45,7 @@ func (c *CoordinatorV1) RegisterFilters() error { return c.logPoller.RegisterFilter( logpoller.Filter{ - Name: logpoller.FilterName("FunctionsLogPollerWrapper", c.address.String(), "-v", "1"), + Name: logpoller.FilterName(logPollerWrapperV1, c.address.String()), EventSigs: []common.Hash{ functions_coordinator_1_1_0.FunctionsCoordinator110OracleRequest{}.Topic(), functions_coordinator_1_1_0.FunctionsCoordinator110OracleResponse{}.Topic(), diff --git a/core/services/relay/evm/functions/coordinator_v2.go b/core/services/relay/evm/functions/coordinator_v2.go index 29edf4676a3..555593bd716 100644 --- a/core/services/relay/evm/functions/coordinator_v2.go +++ b/core/services/relay/evm/functions/coordinator_v2.go @@ -13,6 +13,8 @@ import ( evmRelayTypes "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/types" ) +const logPollerWrapperV2 = "FunctionsLogPollerWrapperV2" + type CoordinatorV2 struct { address common.Address abiArgs abi.Arguments @@ -43,7 +45,7 @@ func (c *CoordinatorV2) RegisterFilters() error { return c.logPoller.RegisterFilter( logpoller.Filter{ - Name: logpoller.FilterName("FunctionsLogPollerWrapper", c.address.String(), "-v", "2"), + Name: logpoller.FilterName(logPollerWrapperV2, c.address.String()), EventSigs: []common.Hash{ functions_coordinator.FunctionsCoordinatorOracleRequest{}.Topic(), functions_coordinator.FunctionsCoordinatorOracleResponse{}.Topic(),