diff --git a/GNUmakefile b/GNUmakefile index 592183923e2..81a64725006 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -136,7 +136,7 @@ testdb-user-only: ## Prepares the test database with user only. # Format for CI .PHONY: presubmit presubmit: ## Format go files and imports. - goimports -w . + goimports -w -local github.com/smartcontractkit/chainlink . gofmt -w . go mod tidy diff --git a/core/chains/evm/config/mocks/chain_scoped_config.go b/core/chains/evm/config/mocks/chain_scoped_config.go index a2fe703f98f..b4d76a9f7ed 100644 --- a/core/chains/evm/config/mocks/chain_scoped_config.go +++ b/core/chains/evm/config/mocks/chain_scoped_config.go @@ -3,8 +3,9 @@ package mocks import ( - config "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config" mock "github.com/stretchr/testify/mock" + + config "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config" ) // ChainScopedConfig is an autogenerated mock type for the ChainScopedConfig type diff --git a/core/chains/evm/config/mocks/gas_estimator.go b/core/chains/evm/config/mocks/gas_estimator.go index 1ead5e68917..1ae1f960754 100644 --- a/core/chains/evm/config/mocks/gas_estimator.go +++ b/core/chains/evm/config/mocks/gas_estimator.go @@ -4,6 +4,7 @@ package mocks import ( common "github.com/ethereum/go-ethereum/common" + assets "github.com/smartcontractkit/chainlink/v2/core/chains/evm/assets" config "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config" diff --git a/core/chains/evm/forwarders/mocks/orm.go b/core/chains/evm/forwarders/mocks/orm.go index 860ddef855b..97866791343 100644 --- a/core/chains/evm/forwarders/mocks/orm.go +++ b/core/chains/evm/forwarders/mocks/orm.go @@ -4,6 +4,7 @@ package mocks import ( common "github.com/ethereum/go-ethereum/common" + big "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils/big" context "context" diff --git a/core/chains/evm/gas/models.go b/core/chains/evm/gas/models.go index 6cb89818c8f..2d6fe971d9c 100644 --- a/core/chains/evm/gas/models.go +++ b/core/chains/evm/gas/models.go @@ -9,6 +9,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/rpc" pkgerrors "github.com/pkg/errors" + "github.com/smartcontractkit/chainlink-common/pkg/logger" "github.com/smartcontractkit/chainlink-common/pkg/services" bigmath "github.com/smartcontractkit/chainlink-common/pkg/utils/big_math" diff --git a/core/chains/evm/gas/rollups/l1_oracle.go b/core/chains/evm/gas/rollups/l1_oracle.go index ceecb80c608..d9f12dfa79e 100644 --- a/core/chains/evm/gas/rollups/l1_oracle.go +++ b/core/chains/evm/gas/rollups/l1_oracle.go @@ -10,6 +10,7 @@ import ( "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/rpc" + "github.com/smartcontractkit/chainlink-common/pkg/services" "github.com/smartcontractkit/chainlink-common/pkg/logger" diff --git a/core/chains/evm/log/helpers_test.go b/core/chains/evm/log/helpers_test.go index 0419b537a89..05d6263896b 100644 --- a/core/chains/evm/log/helpers_test.go +++ b/core/chains/evm/log/helpers_test.go @@ -14,11 +14,12 @@ import ( "github.com/ethereum/go-ethereum/core/types" "github.com/google/uuid" "github.com/onsi/gomega" - "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" + "github.com/jmoiron/sqlx" "github.com/smartcontractkit/chainlink-common/pkg/logger" diff --git a/core/chains/evm/log/integration_test.go b/core/chains/evm/log/integration_test.go index e6610f109cb..f379c206ccc 100644 --- a/core/chains/evm/log/integration_test.go +++ b/core/chains/evm/log/integration_test.go @@ -12,11 +12,12 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/onsi/gomega" - "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" + "github.com/smartcontractkit/chainlink-common/pkg/logger" "github.com/smartcontractkit/chainlink-common/pkg/services/servicetest" "github.com/smartcontractkit/chainlink-common/pkg/utils/mailbox/mailboxtest" diff --git a/core/chains/evm/log/mocks/abigen_contract.go b/core/chains/evm/log/mocks/abigen_contract.go index 7db05b6e097..077b26c13ec 100644 --- a/core/chains/evm/log/mocks/abigen_contract.go +++ b/core/chains/evm/log/mocks/abigen_contract.go @@ -4,6 +4,7 @@ package mocks import ( common "github.com/ethereum/go-ethereum/common" + generated "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated" mock "github.com/stretchr/testify/mock" diff --git a/core/chains/evm/log/mocks/broadcaster.go b/core/chains/evm/log/mocks/broadcaster.go index 1545624a83d..d2cff2fbf54 100644 --- a/core/chains/evm/log/mocks/broadcaster.go +++ b/core/chains/evm/log/mocks/broadcaster.go @@ -5,9 +5,10 @@ package mocks import ( context "context" - log "github.com/smartcontractkit/chainlink/v2/core/chains/evm/log" mock "github.com/stretchr/testify/mock" + log "github.com/smartcontractkit/chainlink/v2/core/chains/evm/log" + sqlutil "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" types "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" diff --git a/core/chains/evm/mocks/balance_monitor.go b/core/chains/evm/mocks/balance_monitor.go index 95382541179..567aaa4f2fa 100644 --- a/core/chains/evm/mocks/balance_monitor.go +++ b/core/chains/evm/mocks/balance_monitor.go @@ -4,6 +4,7 @@ package mocks import ( common "github.com/ethereum/go-ethereum/common" + assets "github.com/smartcontractkit/chainlink/v2/core/chains/evm/assets" context "context" diff --git a/core/chains/evm/txmgr/mocks/config.go b/core/chains/evm/txmgr/mocks/config.go index 011ba19a958..7f4c455d4a0 100644 --- a/core/chains/evm/txmgr/mocks/config.go +++ b/core/chains/evm/txmgr/mocks/config.go @@ -3,8 +3,9 @@ package mocks import ( - chaintype "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config/chaintype" mock "github.com/stretchr/testify/mock" + + chaintype "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config/chaintype" ) // Config is an autogenerated mock type for the ChainConfig type diff --git a/core/chains/legacyevm/mocks/legacy_chain_container.go b/core/chains/legacyevm/mocks/legacy_chain_container.go index 0425a016014..7bc0567313f 100644 --- a/core/chains/legacyevm/mocks/legacy_chain_container.go +++ b/core/chains/legacyevm/mocks/legacy_chain_container.go @@ -3,9 +3,10 @@ package mocks import ( - legacyevm "github.com/smartcontractkit/chainlink/v2/core/chains/legacyevm" mock "github.com/stretchr/testify/mock" + legacyevm "github.com/smartcontractkit/chainlink/v2/core/chains/legacyevm" + types "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" ) diff --git a/core/config/toml/types.go b/core/config/toml/types.go index 880e72ed34d..3b7668bd732 100644 --- a/core/config/toml/types.go +++ b/core/config/toml/types.go @@ -13,9 +13,10 @@ import ( "go.uber.org/multierr" "go.uber.org/zap/zapcore" + ocrcommontypes "github.com/smartcontractkit/libocr/commontypes" + commonconfig "github.com/smartcontractkit/chainlink-common/pkg/config" pgcommon "github.com/smartcontractkit/chainlink-common/pkg/pg" - ocrcommontypes "github.com/smartcontractkit/libocr/commontypes" "github.com/smartcontractkit/chainlink/v2/core/build" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" diff --git a/core/gethwrappers/go_generate_test.go b/core/gethwrappers/go_generate_test.go index 0eb5da9dd44..1066149278f 100644 --- a/core/gethwrappers/go_generate_test.go +++ b/core/gethwrappers/go_generate_test.go @@ -14,9 +14,9 @@ import ( gethParams "github.com/ethereum/go-ethereum/params" "github.com/fatih/color" - "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" cutils "github.com/smartcontractkit/chainlink-common/pkg/utils" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/utils" diff --git a/core/internal/cltest/cltest.go b/core/internal/cltest/cltest.go index 37e45dccf50..b48c11ab19a 100644 --- a/core/internal/cltest/cltest.go +++ b/core/internal/cltest/cltest.go @@ -35,6 +35,8 @@ import ( "github.com/stretchr/testify/require" "github.com/tidwall/gjson" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" + ocrtypes "github.com/smartcontractkit/libocr/offchainreporting/types" "github.com/smartcontractkit/chainlink/v2/core/services/standardcapabilities" diff --git a/core/internal/features/features_test.go b/core/internal/features/features_test.go index 711c97427c5..19a611d4f13 100644 --- a/core/internal/features/features_test.go +++ b/core/internal/features/features_test.go @@ -25,7 +25,6 @@ import ( "github.com/google/uuid" "github.com/hashicorp/consul/sdk/freeport" "github.com/onsi/gomega" - "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" @@ -33,6 +32,8 @@ import ( "go.uber.org/zap/zaptest/observer" "gopkg.in/guregu/null.v4" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" + ocrcommontypes "github.com/smartcontractkit/libocr/commontypes" "github.com/smartcontractkit/libocr/gethwrappers/offchainaggregator" "github.com/smartcontractkit/libocr/gethwrappers/testoffchainaggregator" diff --git a/core/internal/testutils/configtest/general_config.go b/core/internal/testutils/configtest/general_config.go index 43d1ee3c39e..7c0c758e890 100644 --- a/core/internal/testutils/configtest/general_config.go +++ b/core/internal/testutils/configtest/general_config.go @@ -5,9 +5,10 @@ import ( "testing" "time" - pgcommon "github.com/smartcontractkit/chainlink-common/pkg/pg" "github.com/stretchr/testify/require" + pgcommon "github.com/smartcontractkit/chainlink-common/pkg/pg" + commonconfig "github.com/smartcontractkit/chainlink-common/pkg/config" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/client"