diff --git a/core/chains/evm/config/toml/defaults/Metis_Mainnet.toml b/core/chains/evm/config/toml/defaults/Metis_Mainnet.toml index f057400d01..388b9f00b0 100644 --- a/core/chains/evm/config/toml/defaults/Metis_Mainnet.toml +++ b/core/chains/evm/config/toml/defaults/Metis_Mainnet.toml @@ -1,6 +1,6 @@ # Metis is an L2 chain based on Optimism. ChainID = '1088' -ChainType = 'metis' +ChainType = 'optimismBedrock' # Sequencer offers absolute finality FinalityDepth = 10 FinalityTagEnabled = true diff --git a/core/services/ocr2/plugins/ccip/estimatorconfig/config.go b/core/services/ocr2/plugins/ccip/estimatorconfig/config.go index 0e66f4fb39..4737bd33e8 100644 --- a/core/services/ocr2/plugins/ccip/estimatorconfig/config.go +++ b/core/services/ocr2/plugins/ccip/estimatorconfig/config.go @@ -2,7 +2,6 @@ package estimatorconfig import ( "context" - "errors" "math/big" "github.com/smartcontractkit/chainlink-common/pkg/types/ccip" @@ -42,7 +41,7 @@ func (c *FeeEstimatorConfigService) SetOnRampReader(reader ccip.OnRampReader) { // GetDynamicConfig should be cached in the onRamp reader to avoid unnecessary on-chain calls func (c *FeeEstimatorConfigService) GetDataAvailabilityConfig(ctx context.Context) (destDataAvailabilityOverheadGas, destGasPerDataAvailabilityByte, destDataAvailabilityMultiplierBps int64, err error) { if c.onRampReader == nil { - return 0, 0, 0, errors.New("no OnRampReader has been configured") + return 0, 0, 0, nil } cfg, err := c.onRampReader.GetDynamicConfig(ctx) diff --git a/core/services/ocr2/plugins/ccip/estimatorconfig/config_test.go b/core/services/ocr2/plugins/ccip/estimatorconfig/config_test.go index 0ed7510591..3ecd88ae3b 100644 --- a/core/services/ocr2/plugins/ccip/estimatorconfig/config_test.go +++ b/core/services/ocr2/plugins/ccip/estimatorconfig/config_test.go @@ -24,8 +24,11 @@ func TestFeeEstimatorConfigService(t *testing.T) { var expectedDestDataAvailabilityMultiplierBps int64 = 3 onRampReader := mocks.NewOnRampReader(t) - _, _, _, err := svc.GetDataAvailabilityConfig(ctx) - require.Error(t, err) + destDataAvailabilityOverheadGas, destGasPerDataAvailabilityByte, destDataAvailabilityMultiplierBps, err := svc.GetDataAvailabilityConfig(ctx) + require.NoError(t, err) // if onRampReader not set, return nil error and 0 values + require.EqualValues(t, 0, destDataAvailabilityOverheadGas) + require.EqualValues(t, 0, destGasPerDataAvailabilityByte) + require.EqualValues(t, 0, destDataAvailabilityMultiplierBps) svc.SetOnRampReader(onRampReader) onRampReader.On("GetDynamicConfig", ctx). @@ -35,7 +38,7 @@ func TestFeeEstimatorConfigService(t *testing.T) { DestDataAvailabilityMultiplierBps: uint16(expectedDestDataAvailabilityMultiplierBps), }, nil).Once() - destDataAvailabilityOverheadGas, destGasPerDataAvailabilityByte, destDataAvailabilityMultiplierBps, err := svc.GetDataAvailabilityConfig(ctx) + destDataAvailabilityOverheadGas, destGasPerDataAvailabilityByte, destDataAvailabilityMultiplierBps, err = svc.GetDataAvailabilityConfig(ctx) require.NoError(t, err) require.Equal(t, expectedDestDataAvailabilityOverheadGas, destDataAvailabilityOverheadGas) require.Equal(t, expectedDestGasPerDataAvailabilityByte, destGasPerDataAvailabilityByte) diff --git a/docs/CONFIG.md b/docs/CONFIG.md index 10e2519049..196da084ab 100644 --- a/docs/CONFIG.md +++ b/docs/CONFIG.md @@ -4523,7 +4523,7 @@ GasLimit = 5400000 AutoCreateKey = true BlockBackfillDepth = 10 BlockBackfillSkip = false -ChainType = 'metis' +ChainType = 'optimismBedrock' FinalityDepth = 10 FinalityTagEnabled = true LogBackfillBatchSize = 1000