Skip to content

Commit 41b8c65

Browse files
fix: removing chainlink-common dep as direct dependency (#524)
Attempt to remove dependency on chainlink-common, cloning the required interface for logger and keystore interface However we still have indirect dependency on chainlink-common from our other dependencies. We want to remove dependency on `chainlink-common` because we use it only for the logger, and `chainlink-common` tend to have breaking changes with bad versioning. Chainlink repo run with this commit - smartcontractkit/chainlink#19967 - everything compiled normally JIRA: https://smartcontract-it.atlassian.net/browse/CLD-777
1 parent 5b5f286 commit 41b8c65

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+249
-90
lines changed

.changeset/thin-apes-pump.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"chainlink-deployments-framework": patch
3+
---
4+
5+
fix: remove dep on chainlink-common

.golangci.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,17 @@ linters:
7070
- pkg: github.com/pelletier/go-toml$
7171
desc: Use github.com/pelletier/go-toml/v2 instead
7272
- pkg: github.com/smartcontractkit/chainlink/v2/core/logger
73-
desc: Use github.com/smartcontractkit/chainlink-common/pkg/logger instead
73+
desc: Use github.com/smartcontractkit/chainlink-deployments-framework/pkg/logger instead
7474
- pkg: github.com/pkg/errors
7575
desc: Use the standard library instead, for example https://pkg.go.dev/fmt#Errorf
7676
- pkg: github.com/smartcontractkit/chainlink/v2
7777
desc: You must not import this package. There is no alternative.
7878
- pkg: github.com/smartcontractkit/chainlink/deployment
7979
desc: You must not import this package. There is no alternative.
80+
- pkg: github.com/smartcontractkit/chainlink-common/pkg/logger
81+
desc: Use github.com/smartcontractkit/chainlink-deployments-framework/pkg/logger instead
82+
- pkg: github.com/smartcontractkit/chainlink-common
83+
desc: We want to avoid importing this package as it has regular breaking changes.
8084
goconst:
8185
min-len: 5
8286
govet:

chain/evm/provider/ctf_anvil_provider.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,12 +218,13 @@ import (
218218
"github.com/ethereum/go-ethereum/accounts/abi/bind"
219219
"github.com/ethereum/go-ethereum/crypto"
220220
chainsel "github.com/smartcontractkit/chain-selectors"
221-
"github.com/smartcontractkit/chainlink-common/pkg/logger"
222221
"github.com/smartcontractkit/chainlink-testing-framework/framework"
223222
"github.com/smartcontractkit/chainlink-testing-framework/framework/components/blockchain"
224223
"github.com/smartcontractkit/freeport"
225224
"github.com/testcontainers/testcontainers-go"
226225

226+
"github.com/smartcontractkit/chainlink-deployments-framework/pkg/logger"
227+
227228
"github.com/smartcontractkit/chainlink-deployments-framework/chain"
228229
"github.com/smartcontractkit/chainlink-deployments-framework/chain/evm"
229230
"github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/provider/rpcclient"

chain/evm/provider/ctf_geth_provider.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,12 +223,13 @@ import (
223223
"github.com/ethereum/go-ethereum/core/types"
224224
"github.com/ethereum/go-ethereum/crypto"
225225
chainsel "github.com/smartcontractkit/chain-selectors"
226-
"github.com/smartcontractkit/chainlink-common/pkg/logger"
227226
"github.com/smartcontractkit/chainlink-testing-framework/framework"
228227
"github.com/smartcontractkit/chainlink-testing-framework/framework/components/blockchain"
229228
"github.com/smartcontractkit/freeport"
230229
"github.com/testcontainers/testcontainers-go"
231230

231+
"github.com/smartcontractkit/chainlink-deployments-framework/pkg/logger"
232+
232233
"github.com/smartcontractkit/chainlink-deployments-framework/chain"
233234
"github.com/smartcontractkit/chainlink-deployments-framework/chain/evm"
234235
"github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/provider/rpcclient"

chain/evm/provider/rpc_provider.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ import (
88

99
"github.com/ethereum/go-ethereum/accounts/abi/bind"
1010
chainsel "github.com/smartcontractkit/chain-selectors"
11-
"github.com/smartcontractkit/chainlink-common/pkg/logger"
11+
12+
"github.com/smartcontractkit/chainlink-deployments-framework/pkg/logger"
1213

1314
"github.com/smartcontractkit/chainlink-deployments-framework/chain"
1415
"github.com/smartcontractkit/chainlink-deployments-framework/chain/evm"

chain/evm/provider/rpc_provider_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@ import (
55
"time"
66

77
chainsel "github.com/smartcontractkit/chain-selectors"
8-
"github.com/smartcontractkit/chainlink-common/pkg/logger"
98
"github.com/stretchr/testify/assert"
109
"github.com/stretchr/testify/require"
1110

11+
"github.com/smartcontractkit/chainlink-deployments-framework/pkg/logger"
12+
1213
"github.com/smartcontractkit/chainlink-deployments-framework/chain/evm"
1314
"github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/provider/rpcclient"
1415
)

chain/evm/provider/rpcclient/multiclient.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import (
1717
"github.com/ethereum/go-ethereum/rpc"
1818
"github.com/google/uuid"
1919

20-
"github.com/smartcontractkit/chainlink-common/pkg/logger"
20+
"github.com/smartcontractkit/chainlink-deployments-framework/pkg/logger"
2121

2222
chainsel "github.com/smartcontractkit/chain-selectors"
2323

chain/evm/provider/rpcclient/multiclient_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
"github.com/stretchr/testify/assert"
1313
"github.com/stretchr/testify/require"
1414

15-
"github.com/smartcontractkit/chainlink-common/pkg/logger"
15+
"github.com/smartcontractkit/chainlink-deployments-framework/pkg/logger"
1616
)
1717

1818
// Helper RPC server that always answers with a valid eth_blockNumber response

chain/evm/provider/zksync_rpc_provider.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@ import (
77
"math/big"
88

99
chainsel "github.com/smartcontractkit/chain-selectors"
10-
"github.com/smartcontractkit/chainlink-common/pkg/logger"
1110
zkAccounts "github.com/zksync-sdk/zksync2-go/accounts"
1211
zkClients "github.com/zksync-sdk/zksync2-go/clients"
1312

13+
"github.com/smartcontractkit/chainlink-deployments-framework/pkg/logger"
14+
1415
"github.com/smartcontractkit/chainlink-deployments-framework/chain"
1516
"github.com/smartcontractkit/chainlink-deployments-framework/chain/evm"
1617
"github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/provider/rpcclient"

chain/evm/provider/zksync_rpc_provider_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@ import (
55
"time"
66

77
chainsel "github.com/smartcontractkit/chain-selectors"
8-
"github.com/smartcontractkit/chainlink-common/pkg/logger"
98
"github.com/stretchr/testify/assert"
109
"github.com/stretchr/testify/require"
1110

11+
"github.com/smartcontractkit/chainlink-deployments-framework/pkg/logger"
12+
1213
"github.com/smartcontractkit/chainlink-deployments-framework/chain/evm"
1314
"github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/provider/rpcclient"
1415
)

0 commit comments

Comments
 (0)