From 746d01d283974a5ed743231c9e937ee0c36544fa Mon Sep 17 00:00:00 2001 From: Oliver Townsend Date: Fri, 11 Oct 2024 15:24:57 -0700 Subject: [PATCH] Move daoracle config into own package --- .../ocrimpls/contract_transmitter_test.go | 4 +-- .../evm/config/chain_scoped_gas_estimator.go | 5 ++-- core/chains/evm/config/config.go | 4 +-- core/chains/evm/config/toml/config.go | 27 +++---------------- .../chains/evm/config/toml/daoracle/config.go | 25 +++++++++++++++++ core/chains/evm/gas/models_test.go | 4 +-- .../evm/gas/rollups/da_oracle_test_helper.go | 10 +++---- core/chains/evm/gas/rollups/l1_oracle.go | 8 +++--- core/chains/evm/gas/rollups/l1_oracle_test.go | 16 +++++------ .../evm/gas/rollups/op_l1_oracle_test.go | 20 +++++++------- core/chains/evm/txmgr/test_helpers.go | 4 +-- 11 files changed, 66 insertions(+), 61 deletions(-) create mode 100644 core/chains/evm/config/toml/daoracle/config.go diff --git a/core/capabilities/ccip/ocrimpls/contract_transmitter_test.go b/core/capabilities/ccip/ocrimpls/contract_transmitter_test.go index 521ff08ed15..8ea42fa3f88 100644 --- a/core/capabilities/ccip/ocrimpls/contract_transmitter_test.go +++ b/core/capabilities/ccip/ocrimpls/contract_transmitter_test.go @@ -9,7 +9,7 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/capabilities/ccip/ocrimpls" cctypes "github.com/smartcontractkit/chainlink/v2/core/capabilities/ccip/types" - "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config/toml" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config/toml/daoracle" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" "github.com/ethereum/go-ethereum/accounts/abi/bind" @@ -598,7 +598,7 @@ type TestDAOracleConfig struct { evmconfig.DAOracle } -func (d *TestDAOracleConfig) OracleType() toml.OracleType { return toml.OPStack } +func (d *TestDAOracleConfig) OracleType() daoracle.OracleType { return daoracle.OPStack } func (d *TestDAOracleConfig) OracleAddress() *types.EIP55Address { a, err := types.NewEIP55Address("0x420000000000000000000000000000000000000F") if err != nil { diff --git a/core/chains/evm/config/chain_scoped_gas_estimator.go b/core/chains/evm/config/chain_scoped_gas_estimator.go index 49e438fc67c..d7164ddfb29 100644 --- a/core/chains/evm/config/chain_scoped_gas_estimator.go +++ b/core/chains/evm/config/chain_scoped_gas_estimator.go @@ -7,6 +7,7 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/chains/evm/assets" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config/toml" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config/toml/daoracle" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" ) @@ -124,10 +125,10 @@ func (g *gasEstimatorConfig) EstimateLimit() bool { } type daOracleConfig struct { - c toml.DAOracle + c daoracle.DAOracle } -func (d *daOracleConfig) OracleType() toml.OracleType { +func (d *daOracleConfig) OracleType() daoracle.OracleType { return d.c.OracleType } diff --git a/core/chains/evm/config/config.go b/core/chains/evm/config/config.go index db08512a146..89040a4dd0c 100644 --- a/core/chains/evm/config/config.go +++ b/core/chains/evm/config/config.go @@ -11,7 +11,7 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/chains/evm/assets" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config/chaintype" - "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config/toml" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config/toml/daoracle" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" ) @@ -165,7 +165,7 @@ type BlockHistory interface { } type DAOracle interface { - OracleType() toml.OracleType + OracleType() daoracle.OracleType OracleAddress() *types.EIP55Address CustomGasPriceCalldata() string } diff --git a/core/chains/evm/config/toml/config.go b/core/chains/evm/config/toml/config.go index 27a279f49fc..bb488ea7637 100644 --- a/core/chains/evm/config/toml/config.go +++ b/core/chains/evm/config/toml/config.go @@ -19,6 +19,7 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/chains/evm/assets" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config/chaintype" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config/toml/daoracle" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils/big" ) @@ -588,7 +589,7 @@ type GasEstimator struct { BlockHistory BlockHistoryEstimator `toml:",omitempty"` FeeHistory FeeHistoryEstimator `toml:",omitempty"` - DAOracle DAOracle `toml:",omitempty"` + DAOracle daoracle.DAOracle `toml:",omitempty"` } func (e *GasEstimator) ValidateConfig() (err error) { @@ -684,7 +685,7 @@ func (e *GasEstimator) setFrom(f *GasEstimator) { e.LimitJobType.setFrom(&f.LimitJobType) e.BlockHistory.setFrom(&f.BlockHistory) e.FeeHistory.setFrom(&f.FeeHistory) - e.DAOracle.setFrom(&f.DAOracle) + e.DAOracle.SetFrom(&f.DAOracle) } type GasLimitJobType struct { @@ -757,28 +758,6 @@ func (u *FeeHistoryEstimator) setFrom(f *FeeHistoryEstimator) { } } -type DAOracle struct { - OracleType OracleType - OracleAddress *types.EIP55Address - CustomGasPriceCalldata string -} - -type OracleType string - -const ( - OPStack = OracleType("opstack") - Arbitrum = OracleType("arbitrum") - ZKSync = OracleType("zksync") -) - -func (d *DAOracle) setFrom(f *DAOracle) { - d.OracleType = f.OracleType - if v := f.OracleAddress; v != nil { - d.OracleAddress = v - } - d.CustomGasPriceCalldata = f.CustomGasPriceCalldata -} - type KeySpecificConfig []KeySpecific func (ks KeySpecificConfig) ValidateConfig() (err error) { diff --git a/core/chains/evm/config/toml/daoracle/config.go b/core/chains/evm/config/toml/daoracle/config.go new file mode 100644 index 00000000000..425b87ba090 --- /dev/null +++ b/core/chains/evm/config/toml/daoracle/config.go @@ -0,0 +1,25 @@ +package daoracle + +import "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" + +type OracleType string + +const ( + OPStack = OracleType("opstack") + Arbitrum = OracleType("arbitrum") + ZKSync = OracleType("zksync") +) + +type DAOracle struct { + OracleType OracleType + OracleAddress *types.EIP55Address + CustomGasPriceCalldata string +} + +func (d *DAOracle) SetFrom(f *DAOracle) { + d.OracleType = f.OracleType + if v := f.OracleAddress; v != nil { + d.OracleAddress = v + } + d.CustomGasPriceCalldata = f.CustomGasPriceCalldata +} diff --git a/core/chains/evm/gas/models_test.go b/core/chains/evm/gas/models_test.go index 28ad5260d8a..080a853b1c5 100644 --- a/core/chains/evm/gas/models_test.go +++ b/core/chains/evm/gas/models_test.go @@ -16,7 +16,7 @@ import ( commonfee "github.com/smartcontractkit/chainlink/v2/common/fee" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/assets" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config/chaintype" - "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config/toml" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config/toml/daoracle" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/gas" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/gas/mocks" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/gas/rollups" @@ -72,7 +72,7 @@ func TestWrappedEvmEstimator(t *testing.T) { assert.Nil(t, l1Oracle) // expect l1Oracle - daOracle := rollups.CreateTestDAOracle(t, toml.OPStack, "0x420000000000000000000000000000000000000F", "") + daOracle := rollups.CreateTestDAOracle(t, daoracle.OPStack, "0x420000000000000000000000000000000000000F", "") oracle, err := rollups.NewL1GasOracle(lggr, nil, chaintype.ChainOptimismBedrock, daOracle) require.NoError(t, err) // cast oracle to L1Oracle interface diff --git a/core/chains/evm/gas/rollups/da_oracle_test_helper.go b/core/chains/evm/gas/rollups/da_oracle_test_helper.go index 57c81c007c0..1837af0b9e1 100644 --- a/core/chains/evm/gas/rollups/da_oracle_test_helper.go +++ b/core/chains/evm/gas/rollups/da_oracle_test_helper.go @@ -5,15 +5,15 @@ import ( "github.com/stretchr/testify/require" - "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config/toml" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config/toml/daoracle" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" ) type TestDAOracle struct { - toml.DAOracle + daoracle.DAOracle } -func (d *TestDAOracle) OracleType() toml.OracleType { +func (d *TestDAOracle) OracleType() daoracle.OracleType { return d.DAOracle.OracleType } @@ -25,12 +25,12 @@ func (d *TestDAOracle) CustomGasPriceCalldata() string { return d.DAOracle.CustomGasPriceCalldata } -func CreateTestDAOracle(t *testing.T, oracleType toml.OracleType, oracleAddress string, customGasPriceCalldata string) *TestDAOracle { +func CreateTestDAOracle(t *testing.T, oracleType daoracle.OracleType, oracleAddress string, customGasPriceCalldata string) *TestDAOracle { oracleAddr, err := types.NewEIP55Address(oracleAddress) require.NoError(t, err) return &TestDAOracle{ - DAOracle: toml.DAOracle{ + DAOracle: daoracle.DAOracle{ OracleType: oracleType, OracleAddress: &oracleAddr, CustomGasPriceCalldata: customGasPriceCalldata, diff --git a/core/chains/evm/gas/rollups/l1_oracle.go b/core/chains/evm/gas/rollups/l1_oracle.go index e03b27b3176..281c3f17a63 100644 --- a/core/chains/evm/gas/rollups/l1_oracle.go +++ b/core/chains/evm/gas/rollups/l1_oracle.go @@ -17,7 +17,7 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/chains/evm/assets" evmconfig "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config/chaintype" - "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config/toml" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config/toml/daoracle" ) // L1Oracle provides interface for fetching L1-specific fee components if the chain is an L2. @@ -57,11 +57,11 @@ func NewL1GasOracle(lggr logger.Logger, ethClient l1OracleClient, chainType chai var err error if daOracle != nil { switch daOracle.OracleType() { - case toml.OPStack: + case daoracle.OPStack: l1Oracle, err = NewOpStackL1GasOracle(lggr, ethClient, chainType, daOracle) - case toml.Arbitrum: + case daoracle.Arbitrum: l1Oracle, err = NewArbitrumL1GasOracle(lggr, ethClient) - case toml.ZKSync: + case daoracle.ZKSync: l1Oracle = NewZkSyncL1GasOracle(lggr, ethClient) default: err = fmt.Errorf("unsupported DA oracle type %s. Going forward all chain configs should specify an oracle type", daOracle.OracleType()) diff --git a/core/chains/evm/gas/rollups/l1_oracle_test.go b/core/chains/evm/gas/rollups/l1_oracle_test.go index 82dc7925293..7a1e9346c01 100644 --- a/core/chains/evm/gas/rollups/l1_oracle_test.go +++ b/core/chains/evm/gas/rollups/l1_oracle_test.go @@ -19,7 +19,7 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/chains/evm/assets" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config/chaintype" - "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config/toml" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config/toml/daoracle" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/gas/rollups/mocks" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils" ) @@ -30,7 +30,7 @@ func TestL1Oracle(t *testing.T) { t.Run("Unsupported ChainType returns nil", func(t *testing.T) { ethClient := mocks.NewL1OracleClient(t) - daOracle := CreateTestDAOracle(t, toml.OPStack, utils.RandomAddress().String(), "") + daOracle := CreateTestDAOracle(t, daoracle.OPStack, utils.RandomAddress().String(), "") oracle, err := NewL1GasOracle(logger.Test(t), ethClient, chaintype.ChainCelo, daOracle) require.NoError(t, err) assert.Nil(t, oracle) @@ -43,7 +43,7 @@ func TestL1Oracle_GasPrice(t *testing.T) { t.Run("Calling GasPrice on unstarted L1Oracle returns error", func(t *testing.T) { ethClient := mocks.NewL1OracleClient(t) - daOracle := CreateTestDAOracle(t, toml.OPStack, utils.RandomAddress().String(), "") + daOracle := CreateTestDAOracle(t, daoracle.OPStack, utils.RandomAddress().String(), "") oracle, err := NewL1GasOracle(logger.Test(t), ethClient, chaintype.ChainOptimismBedrock, daOracle) require.NoError(t, err) @@ -67,7 +67,7 @@ func TestL1Oracle_GasPrice(t *testing.T) { assert.Nil(t, blockNumber) }).Return(common.BigToHash(l1BaseFee).Bytes(), nil) - daOracle := CreateTestDAOracle(t, toml.Arbitrum, "0x0000000000000000000000000000000000000000", "") + daOracle := CreateTestDAOracle(t, daoracle.Arbitrum, "0x0000000000000000000000000000000000000000", "") oracle, err := NewL1GasOracle(logger.Test(t), ethClient, chaintype.ChainArbitrum, daOracle) require.NoError(t, err) servicetest.RunHealthy(t, oracle) @@ -97,7 +97,7 @@ func TestL1Oracle_GasPrice(t *testing.T) { assert.Nil(t, blockNumber) }).Return(common.BigToHash(l1BaseFee).Bytes(), nil) - daOracle := CreateTestDAOracle(t, toml.OPStack, oracleAddress, "") + daOracle := CreateTestDAOracle(t, daoracle.OPStack, oracleAddress, "") oracle, err := NewL1GasOracle(logger.Test(t), ethClient, chaintype.ChainKroma, daOracle) require.NoError(t, err) servicetest.RunHealthy(t, oracle) @@ -127,7 +127,7 @@ func TestL1Oracle_GasPrice(t *testing.T) { assert.Nil(t, blockNumber) }).Return(common.BigToHash(l1BaseFee).Bytes(), nil) - daOracle := CreateTestDAOracle(t, toml.OPStack, oracleAddress, "") + daOracle := CreateTestDAOracle(t, daoracle.OPStack, oracleAddress, "") oracle, err := NewL1GasOracle(logger.Test(t), ethClient, chaintype.ChainOptimismBedrock, daOracle) require.NoError(t, err) servicetest.RunHealthy(t, oracle) @@ -156,7 +156,7 @@ func TestL1Oracle_GasPrice(t *testing.T) { assert.Nil(t, blockNumber) }).Return(common.BigToHash(l1BaseFee).Bytes(), nil) - daOracle := CreateTestDAOracle(t, toml.OPStack, oracleAddress, "") + daOracle := CreateTestDAOracle(t, daoracle.OPStack, oracleAddress, "") oracle, err := NewL1GasOracle(logger.Test(t), ethClient, chaintype.ChainScroll, daOracle) require.NoError(t, err) servicetest.RunHealthy(t, oracle) @@ -194,7 +194,7 @@ func TestL1Oracle_GasPrice(t *testing.T) { assert.Nil(t, blockNumber) }).Return(common.BigToHash(gasPerPubByteL2).Bytes(), nil) - daOracle := CreateTestDAOracle(t, toml.ZKSync, "0x0000000000000000000000000000000000000000", "") + daOracle := CreateTestDAOracle(t, daoracle.ZKSync, "0x0000000000000000000000000000000000000000", "") oracle, err := NewL1GasOracle(logger.Test(t), ethClient, chaintype.ChainZkSync, daOracle) require.NoError(t, err) servicetest.RunHealthy(t, oracle) diff --git a/core/chains/evm/gas/rollups/op_l1_oracle_test.go b/core/chains/evm/gas/rollups/op_l1_oracle_test.go index 8d5fd357baf..1fce04f2798 100644 --- a/core/chains/evm/gas/rollups/op_l1_oracle_test.go +++ b/core/chains/evm/gas/rollups/op_l1_oracle_test.go @@ -19,7 +19,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config/chaintype" - "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config/toml" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config/toml/daoracle" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/gas/rollups/mocks" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils" ) @@ -103,7 +103,7 @@ func TestOPL1Oracle_ReadV1GasPrice(t *testing.T) { assert.Nil(t, blockNumber) }).Return(common.BigToHash(l1BaseFee).Bytes(), nil).Once() - daOracle := CreateTestDAOracle(t, toml.OPStack, "0x0000000000000000000000000000000000001234", "") + daOracle := CreateTestDAOracle(t, daoracle.OPStack, "0x0000000000000000000000000000000000001234", "") oracle, err := NewOpStackL1GasOracle(logger.Test(t), ethClient, chaintype.ChainOptimismBedrock, daOracle) require.NoError(t, err) gasPrice, err := oracle.GetDAGasPrice(tests.Context(t)) @@ -226,7 +226,7 @@ func TestOPL1Oracle_CalculateEcotoneGasPrice(t *testing.T) { ethClient := setupUpgradeCheck(t, oracleAddress, false, true) mockBatchContractCall(t, ethClient, oracleAddress, baseFee, baseFeeScalar, blobBaseFee, blobBaseFeeScalar, decimals) - daOracle := CreateTestDAOracle(t, toml.OPStack, oracleAddress, "") + daOracle := CreateTestDAOracle(t, daoracle.OPStack, oracleAddress, "") oracle, err := NewOpStackL1GasOracle(logger.Test(t), ethClient, chaintype.ChainOptimismBedrock, daOracle) require.NoError(t, err) gasPrice, err := oracle.GetDAGasPrice(tests.Context(t)) @@ -246,7 +246,7 @@ func TestOPL1Oracle_CalculateEcotoneGasPrice(t *testing.T) { rpcElements[1].Result = &badData }).Return(nil).Once() - daOracle := CreateTestDAOracle(t, toml.OPStack, oracleAddress, "") + daOracle := CreateTestDAOracle(t, daoracle.OPStack, oracleAddress, "") oracle, err := NewOpStackL1GasOracle(logger.Test(t), ethClient, chaintype.ChainOptimismBedrock, daOracle) require.NoError(t, err) _, err = oracle.GetDAGasPrice(tests.Context(t)) @@ -257,7 +257,7 @@ func TestOPL1Oracle_CalculateEcotoneGasPrice(t *testing.T) { ethClient := setupUpgradeCheck(t, oracleAddress, false, true) ethClient.On("BatchCallContext", mock.Anything, mock.IsType([]rpc.BatchElem{})).Return(fmt.Errorf("revert")).Once() - daOracle := CreateTestDAOracle(t, toml.OPStack, oracleAddress, "") + daOracle := CreateTestDAOracle(t, daoracle.OPStack, oracleAddress, "") oracle, err := NewOpStackL1GasOracle(logger.Test(t), ethClient, chaintype.ChainOptimismBedrock, daOracle) require.NoError(t, err) _, err = oracle.GetDAGasPrice(tests.Context(t)) @@ -273,7 +273,7 @@ func TestOPL1Oracle_CalculateEcotoneGasPrice(t *testing.T) { rpcElements[1].Error = fmt.Errorf("revert") }).Return(nil).Once() - daOracle := CreateTestDAOracle(t, toml.OPStack, oracleAddress, "") + daOracle := CreateTestDAOracle(t, daoracle.OPStack, oracleAddress, "") oracle, err := NewOpStackL1GasOracle(logger.Test(t), ethClient, chaintype.ChainOptimismBedrock, daOracle) require.NoError(t, err) _, err = oracle.GetDAGasPrice(tests.Context(t)) @@ -295,7 +295,7 @@ func TestOPL1Oracle_CalculateFjordGasPrice(t *testing.T) { ethClient := setupUpgradeCheck(t, oracleAddress, true, true) mockBatchContractCall(t, ethClient, oracleAddress, baseFee, baseFeeScalar, blobBaseFee, blobBaseFeeScalar, decimals) - daOracle := CreateTestDAOracle(t, toml.OPStack, oracleAddress, "") + daOracle := CreateTestDAOracle(t, daoracle.OPStack, oracleAddress, "") oracle, err := NewOpStackL1GasOracle(logger.Test(t), ethClient, chaintype.ChainOptimismBedrock, daOracle) require.NoError(t, err) gasPrice, err := oracle.GetDAGasPrice(tests.Context(t)) @@ -315,7 +315,7 @@ func TestOPL1Oracle_CalculateFjordGasPrice(t *testing.T) { rpcElements[1].Result = &badData }).Return(nil).Once() - daOracle := CreateTestDAOracle(t, toml.OPStack, oracleAddress, "") + daOracle := CreateTestDAOracle(t, daoracle.OPStack, oracleAddress, "") oracle, err := NewOpStackL1GasOracle(logger.Test(t), ethClient, chaintype.ChainOptimismBedrock, daOracle) require.NoError(t, err) _, err = oracle.GetDAGasPrice(tests.Context(t)) @@ -326,7 +326,7 @@ func TestOPL1Oracle_CalculateFjordGasPrice(t *testing.T) { ethClient := setupUpgradeCheck(t, oracleAddress, true, true) ethClient.On("BatchCallContext", mock.Anything, mock.IsType([]rpc.BatchElem{})).Return(fmt.Errorf("revert")).Once() - daOracle := CreateTestDAOracle(t, toml.OPStack, oracleAddress, "") + daOracle := CreateTestDAOracle(t, daoracle.OPStack, oracleAddress, "") oracle, err := NewOpStackL1GasOracle(logger.Test(t), ethClient, chaintype.ChainOptimismBedrock, daOracle) require.NoError(t, err) _, err = oracle.GetDAGasPrice(tests.Context(t)) @@ -342,7 +342,7 @@ func TestOPL1Oracle_CalculateFjordGasPrice(t *testing.T) { rpcElements[1].Error = fmt.Errorf("revert") }).Return(nil).Once() - daOracle := CreateTestDAOracle(t, toml.OPStack, oracleAddress, "") + daOracle := CreateTestDAOracle(t, daoracle.OPStack, oracleAddress, "") oracle, err := NewOpStackL1GasOracle(logger.Test(t), ethClient, chaintype.ChainOptimismBedrock, daOracle) require.NoError(t, err) _, err = oracle.GetDAGasPrice(tests.Context(t)) diff --git a/core/chains/evm/txmgr/test_helpers.go b/core/chains/evm/txmgr/test_helpers.go index 5b5295432da..e89282247f8 100644 --- a/core/chains/evm/txmgr/test_helpers.go +++ b/core/chains/evm/txmgr/test_helpers.go @@ -10,7 +10,7 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/chains/evm/assets" evmconfig "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config/chaintype" - "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config/toml" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config/toml/daoracle" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils" "github.com/smartcontractkit/chainlink/v2/core/config" @@ -82,7 +82,7 @@ type TestDAOracleConfig struct { evmconfig.DAOracle } -func (d *TestDAOracleConfig) OracleType() toml.OracleType { return toml.OPStack } +func (d *TestDAOracleConfig) OracleType() daoracle.OracleType { return daoracle.OPStack } func (d *TestDAOracleConfig) OracleAddress() *types.EIP55Address { a, err := types.NewEIP55Address("0x420000000000000000000000000000000000000F") if err != nil {