diff --git a/core/chains/evm/config/mocks/chain_scoped_config.go b/core/chains/evm/config/mocks/chain_scoped_config.go index 7bf324c3560..8183f666c3b 100644 --- a/core/chains/evm/config/mocks/chain_scoped_config.go +++ b/core/chains/evm/config/mocks/chain_scoped_config.go @@ -1492,1198 +1492,6 @@ func (_m *ChainScopedConfig) GetDatabaseDialectConfiguredOrDefault() dialects.Di return r0 } -// GlobalBalanceMonitorEnabled provides a mock function with given fields: -func (_m *ChainScopedConfig) GlobalBalanceMonitorEnabled() (bool, bool) { - ret := _m.Called() - - var r0 bool - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(bool) - } - - var r1 bool - if rf, ok := ret.Get(1).(func() bool); ok { - r1 = rf() - } else { - r1 = ret.Get(1).(bool) - } - - return r0, r1 -} - -// GlobalBlockEmissionIdleWarningThreshold provides a mock function with given fields: -func (_m *ChainScopedConfig) GlobalBlockEmissionIdleWarningThreshold() (time.Duration, bool) { - ret := _m.Called() - - var r0 time.Duration - if rf, ok := ret.Get(0).(func() time.Duration); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(time.Duration) - } - - var r1 bool - if rf, ok := ret.Get(1).(func() bool); ok { - r1 = rf() - } else { - r1 = ret.Get(1).(bool) - } - - return r0, r1 -} - -// GlobalBlockHistoryEstimatorBatchSize provides a mock function with given fields: -func (_m *ChainScopedConfig) GlobalBlockHistoryEstimatorBatchSize() (uint32, bool) { - ret := _m.Called() - - var r0 uint32 - if rf, ok := ret.Get(0).(func() uint32); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(uint32) - } - - var r1 bool - if rf, ok := ret.Get(1).(func() bool); ok { - r1 = rf() - } else { - r1 = ret.Get(1).(bool) - } - - return r0, r1 -} - -// GlobalBlockHistoryEstimatorBlockDelay provides a mock function with given fields: -func (_m *ChainScopedConfig) GlobalBlockHistoryEstimatorBlockDelay() (uint16, bool) { - ret := _m.Called() - - var r0 uint16 - if rf, ok := ret.Get(0).(func() uint16); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(uint16) - } - - var r1 bool - if rf, ok := ret.Get(1).(func() bool); ok { - r1 = rf() - } else { - r1 = ret.Get(1).(bool) - } - - return r0, r1 -} - -// GlobalBlockHistoryEstimatorBlockHistorySize provides a mock function with given fields: -func (_m *ChainScopedConfig) GlobalBlockHistoryEstimatorBlockHistorySize() (uint16, bool) { - ret := _m.Called() - - var r0 uint16 - if rf, ok := ret.Get(0).(func() uint16); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(uint16) - } - - var r1 bool - if rf, ok := ret.Get(1).(func() bool); ok { - r1 = rf() - } else { - r1 = ret.Get(1).(bool) - } - - return r0, r1 -} - -// GlobalBlockHistoryEstimatorEIP1559FeeCapBufferBlocks provides a mock function with given fields: -func (_m *ChainScopedConfig) GlobalBlockHistoryEstimatorEIP1559FeeCapBufferBlocks() (uint16, bool) { - ret := _m.Called() - - var r0 uint16 - if rf, ok := ret.Get(0).(func() uint16); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(uint16) - } - - var r1 bool - if rf, ok := ret.Get(1).(func() bool); ok { - r1 = rf() - } else { - r1 = ret.Get(1).(bool) - } - - return r0, r1 -} - -// GlobalBlockHistoryEstimatorTransactionPercentile provides a mock function with given fields: -func (_m *ChainScopedConfig) GlobalBlockHistoryEstimatorTransactionPercentile() (uint16, bool) { - ret := _m.Called() - - var r0 uint16 - if rf, ok := ret.Get(0).(func() uint16); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(uint16) - } - - var r1 bool - if rf, ok := ret.Get(1).(func() bool); ok { - r1 = rf() - } else { - r1 = ret.Get(1).(bool) - } - - return r0, r1 -} - -// GlobalChainType provides a mock function with given fields: -func (_m *ChainScopedConfig) GlobalChainType() (string, bool) { - ret := _m.Called() - - var r0 string - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(string) - } - - var r1 bool - if rf, ok := ret.Get(1).(func() bool); ok { - r1 = rf() - } else { - r1 = ret.Get(1).(bool) - } - - return r0, r1 -} - -// GlobalEthTxReaperInterval provides a mock function with given fields: -func (_m *ChainScopedConfig) GlobalEthTxReaperInterval() (time.Duration, bool) { - ret := _m.Called() - - var r0 time.Duration - if rf, ok := ret.Get(0).(func() time.Duration); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(time.Duration) - } - - var r1 bool - if rf, ok := ret.Get(1).(func() bool); ok { - r1 = rf() - } else { - r1 = ret.Get(1).(bool) - } - - return r0, r1 -} - -// GlobalEthTxReaperThreshold provides a mock function with given fields: -func (_m *ChainScopedConfig) GlobalEthTxReaperThreshold() (time.Duration, bool) { - ret := _m.Called() - - var r0 time.Duration - if rf, ok := ret.Get(0).(func() time.Duration); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(time.Duration) - } - - var r1 bool - if rf, ok := ret.Get(1).(func() bool); ok { - r1 = rf() - } else { - r1 = ret.Get(1).(bool) - } - - return r0, r1 -} - -// GlobalEthTxResendAfterThreshold provides a mock function with given fields: -func (_m *ChainScopedConfig) GlobalEthTxResendAfterThreshold() (time.Duration, bool) { - ret := _m.Called() - - var r0 time.Duration - if rf, ok := ret.Get(0).(func() time.Duration); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(time.Duration) - } - - var r1 bool - if rf, ok := ret.Get(1).(func() bool); ok { - r1 = rf() - } else { - r1 = ret.Get(1).(bool) - } - - return r0, r1 -} - -// GlobalEvmEIP1559DynamicFees provides a mock function with given fields: -func (_m *ChainScopedConfig) GlobalEvmEIP1559DynamicFees() (bool, bool) { - ret := _m.Called() - - var r0 bool - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(bool) - } - - var r1 bool - if rf, ok := ret.Get(1).(func() bool); ok { - r1 = rf() - } else { - r1 = ret.Get(1).(bool) - } - - return r0, r1 -} - -// GlobalEvmFinalityDepth provides a mock function with given fields: -func (_m *ChainScopedConfig) GlobalEvmFinalityDepth() (uint32, bool) { - ret := _m.Called() - - var r0 uint32 - if rf, ok := ret.Get(0).(func() uint32); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(uint32) - } - - var r1 bool - if rf, ok := ret.Get(1).(func() bool); ok { - r1 = rf() - } else { - r1 = ret.Get(1).(bool) - } - - return r0, r1 -} - -// GlobalEvmGasBumpPercent provides a mock function with given fields: -func (_m *ChainScopedConfig) GlobalEvmGasBumpPercent() (uint16, bool) { - ret := _m.Called() - - var r0 uint16 - if rf, ok := ret.Get(0).(func() uint16); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(uint16) - } - - var r1 bool - if rf, ok := ret.Get(1).(func() bool); ok { - r1 = rf() - } else { - r1 = ret.Get(1).(bool) - } - - return r0, r1 -} - -// GlobalEvmGasBumpThreshold provides a mock function with given fields: -func (_m *ChainScopedConfig) GlobalEvmGasBumpThreshold() (uint64, bool) { - ret := _m.Called() - - var r0 uint64 - if rf, ok := ret.Get(0).(func() uint64); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(uint64) - } - - var r1 bool - if rf, ok := ret.Get(1).(func() bool); ok { - r1 = rf() - } else { - r1 = ret.Get(1).(bool) - } - - return r0, r1 -} - -// GlobalEvmGasBumpTxDepth provides a mock function with given fields: -func (_m *ChainScopedConfig) GlobalEvmGasBumpTxDepth() (uint16, bool) { - ret := _m.Called() - - var r0 uint16 - if rf, ok := ret.Get(0).(func() uint16); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(uint16) - } - - var r1 bool - if rf, ok := ret.Get(1).(func() bool); ok { - r1 = rf() - } else { - r1 = ret.Get(1).(bool) - } - - return r0, r1 -} - -// GlobalEvmGasBumpWei provides a mock function with given fields: -func (_m *ChainScopedConfig) GlobalEvmGasBumpWei() (*big.Int, bool) { - ret := _m.Called() - - var r0 *big.Int - if rf, ok := ret.Get(0).(func() *big.Int); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*big.Int) - } - } - - var r1 bool - if rf, ok := ret.Get(1).(func() bool); ok { - r1 = rf() - } else { - r1 = ret.Get(1).(bool) - } - - return r0, r1 -} - -// GlobalEvmGasFeeCapDefault provides a mock function with given fields: -func (_m *ChainScopedConfig) GlobalEvmGasFeeCapDefault() (*big.Int, bool) { - ret := _m.Called() - - var r0 *big.Int - if rf, ok := ret.Get(0).(func() *big.Int); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*big.Int) - } - } - - var r1 bool - if rf, ok := ret.Get(1).(func() bool); ok { - r1 = rf() - } else { - r1 = ret.Get(1).(bool) - } - - return r0, r1 -} - -// GlobalEvmGasLimitDRJobType provides a mock function with given fields: -func (_m *ChainScopedConfig) GlobalEvmGasLimitDRJobType() (uint32, bool) { - ret := _m.Called() - - var r0 uint32 - if rf, ok := ret.Get(0).(func() uint32); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(uint32) - } - - var r1 bool - if rf, ok := ret.Get(1).(func() bool); ok { - r1 = rf() - } else { - r1 = ret.Get(1).(bool) - } - - return r0, r1 -} - -// GlobalEvmGasLimitDefault provides a mock function with given fields: -func (_m *ChainScopedConfig) GlobalEvmGasLimitDefault() (uint32, bool) { - ret := _m.Called() - - var r0 uint32 - if rf, ok := ret.Get(0).(func() uint32); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(uint32) - } - - var r1 bool - if rf, ok := ret.Get(1).(func() bool); ok { - r1 = rf() - } else { - r1 = ret.Get(1).(bool) - } - - return r0, r1 -} - -// GlobalEvmGasLimitFMJobType provides a mock function with given fields: -func (_m *ChainScopedConfig) GlobalEvmGasLimitFMJobType() (uint32, bool) { - ret := _m.Called() - - var r0 uint32 - if rf, ok := ret.Get(0).(func() uint32); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(uint32) - } - - var r1 bool - if rf, ok := ret.Get(1).(func() bool); ok { - r1 = rf() - } else { - r1 = ret.Get(1).(bool) - } - - return r0, r1 -} - -// GlobalEvmGasLimitKeeperJobType provides a mock function with given fields: -func (_m *ChainScopedConfig) GlobalEvmGasLimitKeeperJobType() (uint32, bool) { - ret := _m.Called() - - var r0 uint32 - if rf, ok := ret.Get(0).(func() uint32); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(uint32) - } - - var r1 bool - if rf, ok := ret.Get(1).(func() bool); ok { - r1 = rf() - } else { - r1 = ret.Get(1).(bool) - } - - return r0, r1 -} - -// GlobalEvmGasLimitMax provides a mock function with given fields: -func (_m *ChainScopedConfig) GlobalEvmGasLimitMax() (uint32, bool) { - ret := _m.Called() - - var r0 uint32 - if rf, ok := ret.Get(0).(func() uint32); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(uint32) - } - - var r1 bool - if rf, ok := ret.Get(1).(func() bool); ok { - r1 = rf() - } else { - r1 = ret.Get(1).(bool) - } - - return r0, r1 -} - -// GlobalEvmGasLimitMultiplier provides a mock function with given fields: -func (_m *ChainScopedConfig) GlobalEvmGasLimitMultiplier() (float32, bool) { - ret := _m.Called() - - var r0 float32 - if rf, ok := ret.Get(0).(func() float32); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(float32) - } - - var r1 bool - if rf, ok := ret.Get(1).(func() bool); ok { - r1 = rf() - } else { - r1 = ret.Get(1).(bool) - } - - return r0, r1 -} - -// GlobalEvmGasLimitOCRJobType provides a mock function with given fields: -func (_m *ChainScopedConfig) GlobalEvmGasLimitOCRJobType() (uint32, bool) { - ret := _m.Called() - - var r0 uint32 - if rf, ok := ret.Get(0).(func() uint32); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(uint32) - } - - var r1 bool - if rf, ok := ret.Get(1).(func() bool); ok { - r1 = rf() - } else { - r1 = ret.Get(1).(bool) - } - - return r0, r1 -} - -// GlobalEvmGasLimitTransfer provides a mock function with given fields: -func (_m *ChainScopedConfig) GlobalEvmGasLimitTransfer() (uint32, bool) { - ret := _m.Called() - - var r0 uint32 - if rf, ok := ret.Get(0).(func() uint32); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(uint32) - } - - var r1 bool - if rf, ok := ret.Get(1).(func() bool); ok { - r1 = rf() - } else { - r1 = ret.Get(1).(bool) - } - - return r0, r1 -} - -// GlobalEvmGasLimitVRFJobType provides a mock function with given fields: -func (_m *ChainScopedConfig) GlobalEvmGasLimitVRFJobType() (uint32, bool) { - ret := _m.Called() - - var r0 uint32 - if rf, ok := ret.Get(0).(func() uint32); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(uint32) - } - - var r1 bool - if rf, ok := ret.Get(1).(func() bool); ok { - r1 = rf() - } else { - r1 = ret.Get(1).(bool) - } - - return r0, r1 -} - -// GlobalEvmGasPriceDefault provides a mock function with given fields: -func (_m *ChainScopedConfig) GlobalEvmGasPriceDefault() (*big.Int, bool) { - ret := _m.Called() - - var r0 *big.Int - if rf, ok := ret.Get(0).(func() *big.Int); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*big.Int) - } - } - - var r1 bool - if rf, ok := ret.Get(1).(func() bool); ok { - r1 = rf() - } else { - r1 = ret.Get(1).(bool) - } - - return r0, r1 -} - -// GlobalEvmGasTipCapDefault provides a mock function with given fields: -func (_m *ChainScopedConfig) GlobalEvmGasTipCapDefault() (*big.Int, bool) { - ret := _m.Called() - - var r0 *big.Int - if rf, ok := ret.Get(0).(func() *big.Int); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*big.Int) - } - } - - var r1 bool - if rf, ok := ret.Get(1).(func() bool); ok { - r1 = rf() - } else { - r1 = ret.Get(1).(bool) - } - - return r0, r1 -} - -// GlobalEvmGasTipCapMinimum provides a mock function with given fields: -func (_m *ChainScopedConfig) GlobalEvmGasTipCapMinimum() (*big.Int, bool) { - ret := _m.Called() - - var r0 *big.Int - if rf, ok := ret.Get(0).(func() *big.Int); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*big.Int) - } - } - - var r1 bool - if rf, ok := ret.Get(1).(func() bool); ok { - r1 = rf() - } else { - r1 = ret.Get(1).(bool) - } - - return r0, r1 -} - -// GlobalEvmHeadTrackerHistoryDepth provides a mock function with given fields: -func (_m *ChainScopedConfig) GlobalEvmHeadTrackerHistoryDepth() (uint32, bool) { - ret := _m.Called() - - var r0 uint32 - if rf, ok := ret.Get(0).(func() uint32); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(uint32) - } - - var r1 bool - if rf, ok := ret.Get(1).(func() bool); ok { - r1 = rf() - } else { - r1 = ret.Get(1).(bool) - } - - return r0, r1 -} - -// GlobalEvmHeadTrackerMaxBufferSize provides a mock function with given fields: -func (_m *ChainScopedConfig) GlobalEvmHeadTrackerMaxBufferSize() (uint32, bool) { - ret := _m.Called() - - var r0 uint32 - if rf, ok := ret.Get(0).(func() uint32); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(uint32) - } - - var r1 bool - if rf, ok := ret.Get(1).(func() bool); ok { - r1 = rf() - } else { - r1 = ret.Get(1).(bool) - } - - return r0, r1 -} - -// GlobalEvmHeadTrackerSamplingInterval provides a mock function with given fields: -func (_m *ChainScopedConfig) GlobalEvmHeadTrackerSamplingInterval() (time.Duration, bool) { - ret := _m.Called() - - var r0 time.Duration - if rf, ok := ret.Get(0).(func() time.Duration); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(time.Duration) - } - - var r1 bool - if rf, ok := ret.Get(1).(func() bool); ok { - r1 = rf() - } else { - r1 = ret.Get(1).(bool) - } - - return r0, r1 -} - -// GlobalEvmLogBackfillBatchSize provides a mock function with given fields: -func (_m *ChainScopedConfig) GlobalEvmLogBackfillBatchSize() (uint32, bool) { - ret := _m.Called() - - var r0 uint32 - if rf, ok := ret.Get(0).(func() uint32); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(uint32) - } - - var r1 bool - if rf, ok := ret.Get(1).(func() bool); ok { - r1 = rf() - } else { - r1 = ret.Get(1).(bool) - } - - return r0, r1 -} - -// GlobalEvmLogPollInterval provides a mock function with given fields: -func (_m *ChainScopedConfig) GlobalEvmLogPollInterval() (time.Duration, bool) { - ret := _m.Called() - - var r0 time.Duration - if rf, ok := ret.Get(0).(func() time.Duration); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(time.Duration) - } - - var r1 bool - if rf, ok := ret.Get(1).(func() bool); ok { - r1 = rf() - } else { - r1 = ret.Get(1).(bool) - } - - return r0, r1 -} - -// GlobalEvmMaxGasPriceWei provides a mock function with given fields: -func (_m *ChainScopedConfig) GlobalEvmMaxGasPriceWei() (*big.Int, bool) { - ret := _m.Called() - - var r0 *big.Int - if rf, ok := ret.Get(0).(func() *big.Int); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*big.Int) - } - } - - var r1 bool - if rf, ok := ret.Get(1).(func() bool); ok { - r1 = rf() - } else { - r1 = ret.Get(1).(bool) - } - - return r0, r1 -} - -// GlobalEvmMaxInFlightTransactions provides a mock function with given fields: -func (_m *ChainScopedConfig) GlobalEvmMaxInFlightTransactions() (uint32, bool) { - ret := _m.Called() - - var r0 uint32 - if rf, ok := ret.Get(0).(func() uint32); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(uint32) - } - - var r1 bool - if rf, ok := ret.Get(1).(func() bool); ok { - r1 = rf() - } else { - r1 = ret.Get(1).(bool) - } - - return r0, r1 -} - -// GlobalEvmMaxQueuedTransactions provides a mock function with given fields: -func (_m *ChainScopedConfig) GlobalEvmMaxQueuedTransactions() (uint64, bool) { - ret := _m.Called() - - var r0 uint64 - if rf, ok := ret.Get(0).(func() uint64); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(uint64) - } - - var r1 bool - if rf, ok := ret.Get(1).(func() bool); ok { - r1 = rf() - } else { - r1 = ret.Get(1).(bool) - } - - return r0, r1 -} - -// GlobalEvmMinGasPriceWei provides a mock function with given fields: -func (_m *ChainScopedConfig) GlobalEvmMinGasPriceWei() (*big.Int, bool) { - ret := _m.Called() - - var r0 *big.Int - if rf, ok := ret.Get(0).(func() *big.Int); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*big.Int) - } - } - - var r1 bool - if rf, ok := ret.Get(1).(func() bool); ok { - r1 = rf() - } else { - r1 = ret.Get(1).(bool) - } - - return r0, r1 -} - -// GlobalEvmNonceAutoSync provides a mock function with given fields: -func (_m *ChainScopedConfig) GlobalEvmNonceAutoSync() (bool, bool) { - ret := _m.Called() - - var r0 bool - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(bool) - } - - var r1 bool - if rf, ok := ret.Get(1).(func() bool); ok { - r1 = rf() - } else { - r1 = ret.Get(1).(bool) - } - - return r0, r1 -} - -// GlobalEvmRPCDefaultBatchSize provides a mock function with given fields: -func (_m *ChainScopedConfig) GlobalEvmRPCDefaultBatchSize() (uint32, bool) { - ret := _m.Called() - - var r0 uint32 - if rf, ok := ret.Get(0).(func() uint32); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(uint32) - } - - var r1 bool - if rf, ok := ret.Get(1).(func() bool); ok { - r1 = rf() - } else { - r1 = ret.Get(1).(bool) - } - - return r0, r1 -} - -// GlobalEvmUseForwarders provides a mock function with given fields: -func (_m *ChainScopedConfig) GlobalEvmUseForwarders() (bool, bool) { - ret := _m.Called() - - var r0 bool - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(bool) - } - - var r1 bool - if rf, ok := ret.Get(1).(func() bool); ok { - r1 = rf() - } else { - r1 = ret.Get(1).(bool) - } - - return r0, r1 -} - -// GlobalFlagsContractAddress provides a mock function with given fields: -func (_m *ChainScopedConfig) GlobalFlagsContractAddress() (string, bool) { - ret := _m.Called() - - var r0 string - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(string) - } - - var r1 bool - if rf, ok := ret.Get(1).(func() bool); ok { - r1 = rf() - } else { - r1 = ret.Get(1).(bool) - } - - return r0, r1 -} - -// GlobalGasEstimatorMode provides a mock function with given fields: -func (_m *ChainScopedConfig) GlobalGasEstimatorMode() (string, bool) { - ret := _m.Called() - - var r0 string - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(string) - } - - var r1 bool - if rf, ok := ret.Get(1).(func() bool); ok { - r1 = rf() - } else { - r1 = ret.Get(1).(bool) - } - - return r0, r1 -} - -// GlobalLinkContractAddress provides a mock function with given fields: -func (_m *ChainScopedConfig) GlobalLinkContractAddress() (string, bool) { - ret := _m.Called() - - var r0 string - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(string) - } - - var r1 bool - if rf, ok := ret.Get(1).(func() bool); ok { - r1 = rf() - } else { - r1 = ret.Get(1).(bool) - } - - return r0, r1 -} - -// GlobalMinIncomingConfirmations provides a mock function with given fields: -func (_m *ChainScopedConfig) GlobalMinIncomingConfirmations() (uint32, bool) { - ret := _m.Called() - - var r0 uint32 - if rf, ok := ret.Get(0).(func() uint32); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(uint32) - } - - var r1 bool - if rf, ok := ret.Get(1).(func() bool); ok { - r1 = rf() - } else { - r1 = ret.Get(1).(bool) - } - - return r0, r1 -} - -// GlobalMinimumContractPayment provides a mock function with given fields: -func (_m *ChainScopedConfig) GlobalMinimumContractPayment() (*assets.Link, bool) { - ret := _m.Called() - - var r0 *assets.Link - if rf, ok := ret.Get(0).(func() *assets.Link); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*assets.Link) - } - } - - var r1 bool - if rf, ok := ret.Get(1).(func() bool); ok { - r1 = rf() - } else { - r1 = ret.Get(1).(bool) - } - - return r0, r1 -} - -// GlobalNodeNoNewHeadsThreshold provides a mock function with given fields: -func (_m *ChainScopedConfig) GlobalNodeNoNewHeadsThreshold() (time.Duration, bool) { - ret := _m.Called() - - var r0 time.Duration - if rf, ok := ret.Get(0).(func() time.Duration); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(time.Duration) - } - - var r1 bool - if rf, ok := ret.Get(1).(func() bool); ok { - r1 = rf() - } else { - r1 = ret.Get(1).(bool) - } - - return r0, r1 -} - -// GlobalNodePollFailureThreshold provides a mock function with given fields: -func (_m *ChainScopedConfig) GlobalNodePollFailureThreshold() (uint32, bool) { - ret := _m.Called() - - var r0 uint32 - if rf, ok := ret.Get(0).(func() uint32); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(uint32) - } - - var r1 bool - if rf, ok := ret.Get(1).(func() bool); ok { - r1 = rf() - } else { - r1 = ret.Get(1).(bool) - } - - return r0, r1 -} - -// GlobalNodePollInterval provides a mock function with given fields: -func (_m *ChainScopedConfig) GlobalNodePollInterval() (time.Duration, bool) { - ret := _m.Called() - - var r0 time.Duration - if rf, ok := ret.Get(0).(func() time.Duration); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(time.Duration) - } - - var r1 bool - if rf, ok := ret.Get(1).(func() bool); ok { - r1 = rf() - } else { - r1 = ret.Get(1).(bool) - } - - return r0, r1 -} - -// GlobalNodeSelectionMode provides a mock function with given fields: -func (_m *ChainScopedConfig) GlobalNodeSelectionMode() (string, bool) { - ret := _m.Called() - - var r0 string - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(string) - } - - var r1 bool - if rf, ok := ret.Get(1).(func() bool); ok { - r1 = rf() - } else { - r1 = ret.Get(1).(bool) - } - - return r0, r1 -} - -// GlobalOCRContractConfirmations provides a mock function with given fields: -func (_m *ChainScopedConfig) GlobalOCRContractConfirmations() (uint16, bool) { - ret := _m.Called() - - var r0 uint16 - if rf, ok := ret.Get(0).(func() uint16); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(uint16) - } - - var r1 bool - if rf, ok := ret.Get(1).(func() bool); ok { - r1 = rf() - } else { - r1 = ret.Get(1).(bool) - } - - return r0, r1 -} - -// GlobalOCRContractTransmitterTransmitTimeout provides a mock function with given fields: -func (_m *ChainScopedConfig) GlobalOCRContractTransmitterTransmitTimeout() (time.Duration, bool) { - ret := _m.Called() - - var r0 time.Duration - if rf, ok := ret.Get(0).(func() time.Duration); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(time.Duration) - } - - var r1 bool - if rf, ok := ret.Get(1).(func() bool); ok { - r1 = rf() - } else { - r1 = ret.Get(1).(bool) - } - - return r0, r1 -} - -// GlobalOCRDatabaseTimeout provides a mock function with given fields: -func (_m *ChainScopedConfig) GlobalOCRDatabaseTimeout() (time.Duration, bool) { - ret := _m.Called() - - var r0 time.Duration - if rf, ok := ret.Get(0).(func() time.Duration); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(time.Duration) - } - - var r1 bool - if rf, ok := ret.Get(1).(func() bool); ok { - r1 = rf() - } else { - r1 = ret.Get(1).(bool) - } - - return r0, r1 -} - -// GlobalOCRObservationGracePeriod provides a mock function with given fields: -func (_m *ChainScopedConfig) GlobalOCRObservationGracePeriod() (time.Duration, bool) { - ret := _m.Called() - - var r0 time.Duration - if rf, ok := ret.Get(0).(func() time.Duration); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(time.Duration) - } - - var r1 bool - if rf, ok := ret.Get(1).(func() bool); ok { - r1 = rf() - } else { - r1 = ret.Get(1).(bool) - } - - return r0, r1 -} - -// GlobalOperatorFactoryAddress provides a mock function with given fields: -func (_m *ChainScopedConfig) GlobalOperatorFactoryAddress() (string, bool) { - ret := _m.Called() - - var r0 string - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(string) - } - - var r1 bool - if rf, ok := ret.Get(1).(func() bool); ok { - r1 = rf() - } else { - r1 = ret.Get(1).(bool) - } - - return r0, r1 -} - // HTTPServerWriteTimeout provides a mock function with given fields: func (_m *ChainScopedConfig) HTTPServerWriteTimeout() time.Duration { ret := _m.Called() diff --git a/core/chains/evm/forwarders/mocks/orm.go b/core/chains/evm/forwarders/mocks/orm.go deleted file mode 100644 index e8cb66ca644..00000000000 --- a/core/chains/evm/forwarders/mocks/orm.go +++ /dev/null @@ -1,142 +0,0 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. - -package mocks - -import ( - common "github.com/ethereum/go-ethereum/common" - forwarders "github.com/smartcontractkit/chainlink/core/chains/evm/forwarders" - mock "github.com/stretchr/testify/mock" - - utils "github.com/smartcontractkit/chainlink/core/utils" -) - -// ORM is an autogenerated mock type for the ORM type -type ORM struct { - mock.Mock -} - -// CreateForwarder provides a mock function with given fields: addr, evmChainId -func (_m *ORM) CreateForwarder(addr common.Address, evmChainId utils.Big) (forwarders.Forwarder, error) { - ret := _m.Called(addr, evmChainId) - - var r0 forwarders.Forwarder - if rf, ok := ret.Get(0).(func(common.Address, utils.Big) forwarders.Forwarder); ok { - r0 = rf(addr, evmChainId) - } else { - r0 = ret.Get(0).(forwarders.Forwarder) - } - - var r1 error - if rf, ok := ret.Get(1).(func(common.Address, utils.Big) error); ok { - r1 = rf(addr, evmChainId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// DeleteForwarder provides a mock function with given fields: id -func (_m *ORM) DeleteForwarder(id int32) error { - ret := _m.Called(id) - - var r0 error - if rf, ok := ret.Get(0).(func(int32) error); ok { - r0 = rf(id) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// FindForwarders provides a mock function with given fields: offset, limit -func (_m *ORM) FindForwarders(offset int, limit int) ([]forwarders.Forwarder, int, error) { - ret := _m.Called(offset, limit) - - var r0 []forwarders.Forwarder - if rf, ok := ret.Get(0).(func(int, int) []forwarders.Forwarder); ok { - r0 = rf(offset, limit) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]forwarders.Forwarder) - } - } - - var r1 int - if rf, ok := ret.Get(1).(func(int, int) int); ok { - r1 = rf(offset, limit) - } else { - r1 = ret.Get(1).(int) - } - - var r2 error - if rf, ok := ret.Get(2).(func(int, int) error); ok { - r2 = rf(offset, limit) - } else { - r2 = ret.Error(2) - } - - return r0, r1, r2 -} - -// FindForwardersByChain provides a mock function with given fields: evmChainId -func (_m *ORM) FindForwardersByChain(evmChainId utils.Big) ([]forwarders.Forwarder, error) { - ret := _m.Called(evmChainId) - - var r0 []forwarders.Forwarder - if rf, ok := ret.Get(0).(func(utils.Big) []forwarders.Forwarder); ok { - r0 = rf(evmChainId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]forwarders.Forwarder) - } - } - - var r1 error - if rf, ok := ret.Get(1).(func(utils.Big) error); ok { - r1 = rf(evmChainId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// FindForwardersInListByChain provides a mock function with given fields: evmChainId, addrs -func (_m *ORM) FindForwardersInListByChain(evmChainId utils.Big, addrs []common.Address) ([]forwarders.Forwarder, error) { - ret := _m.Called(evmChainId, addrs) - - var r0 []forwarders.Forwarder - if rf, ok := ret.Get(0).(func(utils.Big, []common.Address) []forwarders.Forwarder); ok { - r0 = rf(evmChainId, addrs) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]forwarders.Forwarder) - } - } - - var r1 error - if rf, ok := ret.Get(1).(func(utils.Big, []common.Address) error); ok { - r1 = rf(evmChainId, addrs) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -type mockConstructorTestingTNewORM interface { - mock.TestingT - Cleanup(func()) -} - -// NewORM creates a new instance of ORM. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewORM(t mockConstructorTestingTNewORM) *ORM { - mock := &ORM{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/core/chains/evm/forwarders/orm.go b/core/chains/evm/forwarders/orm.go index 887e30c03af..25fa5dbb9ad 100644 --- a/core/chains/evm/forwarders/orm.go +++ b/core/chains/evm/forwarders/orm.go @@ -12,8 +12,6 @@ import ( "github.com/smartcontractkit/chainlink/core/utils" ) -//go:generate mockery --name ORM --output ./mocks/ --case=underscore - type ORM interface { CreateForwarder(addr common.Address, evmChainId utils.Big) (fwd Forwarder, err error) FindForwarders(offset, limit int) ([]Forwarder, int, error) diff --git a/core/chains/evm/headtracker/mocks/head_listener.go b/core/chains/evm/headtracker/mocks/head_listener.go deleted file mode 100644 index 52c72fad32b..00000000000 --- a/core/chains/evm/headtracker/mocks/head_listener.go +++ /dev/null @@ -1,61 +0,0 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. - -package mocks - -import ( - types "github.com/smartcontractkit/chainlink/core/chains/evm/headtracker/types" - mock "github.com/stretchr/testify/mock" -) - -// HeadListener is an autogenerated mock type for the HeadListener type -type HeadListener struct { - mock.Mock -} - -// Connected provides a mock function with given fields: -func (_m *HeadListener) Connected() bool { - ret := _m.Called() - - var r0 bool - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(bool) - } - - return r0 -} - -// ListenForNewHeads provides a mock function with given fields: handleNewHead, done -func (_m *HeadListener) ListenForNewHeads(handleNewHead types.NewHeadHandler, done func()) { - _m.Called(handleNewHead, done) -} - -// ReceivingHeads provides a mock function with given fields: -func (_m *HeadListener) ReceivingHeads() bool { - ret := _m.Called() - - var r0 bool - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(bool) - } - - return r0 -} - -type mockConstructorTestingTNewHeadListener interface { - mock.TestingT - Cleanup(func()) -} - -// NewHeadListener creates a new instance of HeadListener. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewHeadListener(t mockConstructorTestingTNewHeadListener) *HeadListener { - mock := &HeadListener{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/core/chains/evm/headtracker/types/types.go b/core/chains/evm/headtracker/types/types.go index 55e9a90ac77..b0dfc763722 100644 --- a/core/chains/evm/headtracker/types/types.go +++ b/core/chains/evm/headtracker/types/types.go @@ -35,6 +35,7 @@ type HeadTracker interface { // HeadTrackable represents any object that wishes to respond to ethereum events, // after being subscribed to HeadBroadcaster +// //go:generate mockery --name HeadTrackable --output ../mocks/ --case=underscore type HeadTrackable interface { OnNewLongestChain(ctx context.Context, head *evmtypes.Head) @@ -46,6 +47,7 @@ type HeadBroadcasterRegistry interface { // HeadBroadcaster relays heads from the head tracker to subscribed jobs, it is less robust against // congestion than the head tracker, and missed heads should be expected by consuming jobs +// //go:generate mockery --name HeadBroadcaster --output ../mocks/ --case=underscore type HeadBroadcaster interface { services.ServiceCtx @@ -57,7 +59,6 @@ type HeadBroadcaster interface { type NewHeadHandler func(ctx context.Context, header *evmtypes.Head) error // HeadListener manages evmclient.Client connection that receives heads from the eth node -//go:generate mockery --name HeadListener --output ../mocks/ --case=underscore type HeadListener interface { // ListenForNewHeads kicks off the listen loop (not thread safe) // done() must be executed upon leaving ListenForNewHeads() diff --git a/core/chains/evm/log/broadcaster.go b/core/chains/evm/log/broadcaster.go index bcc3f3c7764..bc3ea4ccaa3 100644 --- a/core/chains/evm/log/broadcaster.go +++ b/core/chains/evm/log/broadcaster.go @@ -24,8 +24,6 @@ import ( ) //go:generate mockery --name Broadcaster --output ./mocks/ --case=underscore --structname Broadcaster --filename broadcaster.go -//go:generate mockery --name Listener --output ./mocks/ --case=underscore --structname Listener --filename listener.go -//go:generate mockery --name Config --output ./mocks/ --case=underscore --structname Config --filename config.go type ( // The Broadcaster manages log subscription requests for the Chainlink node. Instead diff --git a/core/chains/evm/log/mocks/config.go b/core/chains/evm/log/mocks/config.go deleted file mode 100644 index 79ced3d6d9a..00000000000 --- a/core/chains/evm/log/mocks/config.go +++ /dev/null @@ -1,81 +0,0 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. - -package mocks - -import mock "github.com/stretchr/testify/mock" - -// Config is an autogenerated mock type for the Config type -type Config struct { - mock.Mock -} - -// BlockBackfillDepth provides a mock function with given fields: -func (_m *Config) BlockBackfillDepth() uint64 { - ret := _m.Called() - - var r0 uint64 - if rf, ok := ret.Get(0).(func() uint64); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(uint64) - } - - return r0 -} - -// BlockBackfillSkip provides a mock function with given fields: -func (_m *Config) BlockBackfillSkip() bool { - ret := _m.Called() - - var r0 bool - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(bool) - } - - return r0 -} - -// EvmFinalityDepth provides a mock function with given fields: -func (_m *Config) EvmFinalityDepth() uint32 { - ret := _m.Called() - - var r0 uint32 - if rf, ok := ret.Get(0).(func() uint32); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(uint32) - } - - return r0 -} - -// EvmLogBackfillBatchSize provides a mock function with given fields: -func (_m *Config) EvmLogBackfillBatchSize() uint32 { - ret := _m.Called() - - var r0 uint32 - if rf, ok := ret.Get(0).(func() uint32); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(uint32) - } - - return r0 -} - -type mockConstructorTestingTNewConfig interface { - mock.TestingT - Cleanup(func()) -} - -// NewConfig creates a new instance of Config. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewConfig(t mockConstructorTestingTNewConfig) *Config { - mock := &Config{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/core/chains/evm/log/mocks/listener.go b/core/chains/evm/log/mocks/listener.go deleted file mode 100644 index cc6b8b1c09b..00000000000 --- a/core/chains/evm/log/mocks/listener.go +++ /dev/null @@ -1,47 +0,0 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. - -package mocks - -import ( - log "github.com/smartcontractkit/chainlink/core/chains/evm/log" - mock "github.com/stretchr/testify/mock" -) - -// Listener is an autogenerated mock type for the Listener type -type Listener struct { - mock.Mock -} - -// HandleLog provides a mock function with given fields: b -func (_m *Listener) HandleLog(b log.Broadcast) { - _m.Called(b) -} - -// JobID provides a mock function with given fields: -func (_m *Listener) JobID() int32 { - ret := _m.Called() - - var r0 int32 - if rf, ok := ret.Get(0).(func() int32); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(int32) - } - - return r0 -} - -type mockConstructorTestingTNewListener interface { - mock.TestingT - Cleanup(func()) -} - -// NewListener creates a new instance of Listener. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewListener(t mockConstructorTestingTNewListener) *Listener { - mock := &Listener{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/core/chains/evm/log/mocks/orm.go b/core/chains/evm/log/mocks/orm.go deleted file mode 100644 index f2c37f6f1c8..00000000000 --- a/core/chains/evm/log/mocks/orm.go +++ /dev/null @@ -1,245 +0,0 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. - -package mocks - -import ( - common "github.com/ethereum/go-ethereum/common" - log "github.com/smartcontractkit/chainlink/core/chains/evm/log" - mock "github.com/stretchr/testify/mock" - - pg "github.com/smartcontractkit/chainlink/core/services/pg" -) - -// ORM is an autogenerated mock type for the ORM type -type ORM struct { - mock.Mock -} - -// CreateBroadcast provides a mock function with given fields: blockHash, blockNumber, logIndex, jobID, qopts -func (_m *ORM) CreateBroadcast(blockHash common.Hash, blockNumber uint64, logIndex uint, jobID int32, qopts ...pg.QOpt) error { - _va := make([]interface{}, len(qopts)) - for _i := range qopts { - _va[_i] = qopts[_i] - } - var _ca []interface{} - _ca = append(_ca, blockHash, blockNumber, logIndex, jobID) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - var r0 error - if rf, ok := ret.Get(0).(func(common.Hash, uint64, uint, int32, ...pg.QOpt) error); ok { - r0 = rf(blockHash, blockNumber, logIndex, jobID, qopts...) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// FindBroadcasts provides a mock function with given fields: fromBlockNum, toBlockNum -func (_m *ORM) FindBroadcasts(fromBlockNum int64, toBlockNum int64) ([]log.LogBroadcast, error) { - ret := _m.Called(fromBlockNum, toBlockNum) - - var r0 []log.LogBroadcast - if rf, ok := ret.Get(0).(func(int64, int64) []log.LogBroadcast); ok { - r0 = rf(fromBlockNum, toBlockNum) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]log.LogBroadcast) - } - } - - var r1 error - if rf, ok := ret.Get(1).(func(int64, int64) error); ok { - r1 = rf(fromBlockNum, toBlockNum) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetPendingMinBlock provides a mock function with given fields: qopts -func (_m *ORM) GetPendingMinBlock(qopts ...pg.QOpt) (*int64, error) { - _va := make([]interface{}, len(qopts)) - for _i := range qopts { - _va[_i] = qopts[_i] - } - var _ca []interface{} - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - var r0 *int64 - if rf, ok := ret.Get(0).(func(...pg.QOpt) *int64); ok { - r0 = rf(qopts...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*int64) - } - } - - var r1 error - if rf, ok := ret.Get(1).(func(...pg.QOpt) error); ok { - r1 = rf(qopts...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MarkBroadcastConsumed provides a mock function with given fields: blockHash, blockNumber, logIndex, jobID, qopts -func (_m *ORM) MarkBroadcastConsumed(blockHash common.Hash, blockNumber uint64, logIndex uint, jobID int32, qopts ...pg.QOpt) error { - _va := make([]interface{}, len(qopts)) - for _i := range qopts { - _va[_i] = qopts[_i] - } - var _ca []interface{} - _ca = append(_ca, blockHash, blockNumber, logIndex, jobID) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - var r0 error - if rf, ok := ret.Get(0).(func(common.Hash, uint64, uint, int32, ...pg.QOpt) error); ok { - r0 = rf(blockHash, blockNumber, logIndex, jobID, qopts...) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MarkBroadcastsConsumed provides a mock function with given fields: blockHashes, blockNumbers, logIndexes, jobIDs, qopts -func (_m *ORM) MarkBroadcastsConsumed(blockHashes []common.Hash, blockNumbers []uint64, logIndexes []uint, jobIDs []int32, qopts ...pg.QOpt) error { - _va := make([]interface{}, len(qopts)) - for _i := range qopts { - _va[_i] = qopts[_i] - } - var _ca []interface{} - _ca = append(_ca, blockHashes, blockNumbers, logIndexes, jobIDs) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - var r0 error - if rf, ok := ret.Get(0).(func([]common.Hash, []uint64, []uint, []int32, ...pg.QOpt) error); ok { - r0 = rf(blockHashes, blockNumbers, logIndexes, jobIDs, qopts...) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MarkBroadcastsUnconsumed provides a mock function with given fields: fromBlock, qopts -func (_m *ORM) MarkBroadcastsUnconsumed(fromBlock int64, qopts ...pg.QOpt) error { - _va := make([]interface{}, len(qopts)) - for _i := range qopts { - _va[_i] = qopts[_i] - } - var _ca []interface{} - _ca = append(_ca, fromBlock) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - var r0 error - if rf, ok := ret.Get(0).(func(int64, ...pg.QOpt) error); ok { - r0 = rf(fromBlock, qopts...) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// Reinitialize provides a mock function with given fields: qopts -func (_m *ORM) Reinitialize(qopts ...pg.QOpt) (*int64, error) { - _va := make([]interface{}, len(qopts)) - for _i := range qopts { - _va[_i] = qopts[_i] - } - var _ca []interface{} - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - var r0 *int64 - if rf, ok := ret.Get(0).(func(...pg.QOpt) *int64); ok { - r0 = rf(qopts...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*int64) - } - } - - var r1 error - if rf, ok := ret.Get(1).(func(...pg.QOpt) error); ok { - r1 = rf(qopts...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// SetPendingMinBlock provides a mock function with given fields: blockNum, qopts -func (_m *ORM) SetPendingMinBlock(blockNum *int64, qopts ...pg.QOpt) error { - _va := make([]interface{}, len(qopts)) - for _i := range qopts { - _va[_i] = qopts[_i] - } - var _ca []interface{} - _ca = append(_ca, blockNum) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - var r0 error - if rf, ok := ret.Get(0).(func(*int64, ...pg.QOpt) error); ok { - r0 = rf(blockNum, qopts...) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// WasBroadcastConsumed provides a mock function with given fields: blockHash, logIndex, jobID, qopts -func (_m *ORM) WasBroadcastConsumed(blockHash common.Hash, logIndex uint, jobID int32, qopts ...pg.QOpt) (bool, error) { - _va := make([]interface{}, len(qopts)) - for _i := range qopts { - _va[_i] = qopts[_i] - } - var _ca []interface{} - _ca = append(_ca, blockHash, logIndex, jobID) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - var r0 bool - if rf, ok := ret.Get(0).(func(common.Hash, uint, int32, ...pg.QOpt) bool); ok { - r0 = rf(blockHash, logIndex, jobID, qopts...) - } else { - r0 = ret.Get(0).(bool) - } - - var r1 error - if rf, ok := ret.Get(1).(func(common.Hash, uint, int32, ...pg.QOpt) error); ok { - r1 = rf(blockHash, logIndex, jobID, qopts...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -type mockConstructorTestingTNewORM interface { - mock.TestingT - Cleanup(func()) -} - -// NewORM creates a new instance of ORM. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewORM(t mockConstructorTestingTNewORM) *ORM { - mock := &ORM{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/core/chains/evm/log/orm.go b/core/chains/evm/log/orm.go index d596649f278..8122ec95488 100644 --- a/core/chains/evm/log/orm.go +++ b/core/chains/evm/log/orm.go @@ -16,14 +16,11 @@ import ( "github.com/smartcontractkit/chainlink/core/utils" ) -//go:generate mockery --name ORM --output ./mocks/ --case=underscore --structname ORM --filename orm.go - // ORM is the interface for log broadcasts. -// - Unconsumed broadcasts are created just before notifying subscribers, who are responsible for marking them consumed. -// - Pending broadcast block numbers are synced to the min from the pool (or deleted when empty) -// - On reboot, backfill considers the min block number from unconsumed and pending broadcasts. Additionally, unconsumed -// entries are removed and the pending broadcasts number updated. -// +// - Unconsumed broadcasts are created just before notifying subscribers, who are responsible for marking them consumed. +// - Pending broadcast block numbers are synced to the min from the pool (or deleted when empty) +// - On reboot, backfill considers the min block number from unconsumed and pending broadcasts. Additionally, unconsumed +// entries are removed and the pending broadcasts number updated. type ORM interface { // FindBroadcasts returns broadcasts for a range of block numbers, both consumed and unconsumed. FindBroadcasts(fromBlockNum int64, toBlockNum int64) ([]LogBroadcast, error) diff --git a/core/services/mocks/config.go b/core/services/mocks/config.go deleted file mode 100644 index 13ec40108e6..00000000000 --- a/core/services/mocks/config.go +++ /dev/null @@ -1,39 +0,0 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. - -package mocks - -import mock "github.com/stretchr/testify/mock" - -// Config is an autogenerated mock type for the Config type -type Config struct { - mock.Mock -} - -// LogSQL provides a mock function with given fields: -func (_m *Config) LogSQL() bool { - ret := _m.Called() - - var r0 bool - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(bool) - } - - return r0 -} - -type mockConstructorTestingTNewConfig interface { - mock.TestingT - Cleanup(func()) -} - -// NewConfig creates a new instance of Config. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewConfig(t mockConstructorTestingTNewConfig) *Config { - mock := &Config{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -}