Skip to content

Commit 2033490

Browse files
authored
Merge pull request #561 from smartcontractkit/rename-cw
Bump common and fix Chain Writer name
2 parents f597d93 + 7a1a685 commit 2033490

File tree

12 files changed

+661
-637
lines changed

12 files changed

+661
-637
lines changed

.tool-versions

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Languages
22
nodejs 18.6.0
33
yarn 1.22.19
4-
golang 1.21.5
4+
golang 1.23.3
55
python 3.9.13
66

77
# Tools
88
mockery 2.22.1
9-
golangci-lint 1.61.0
9+
golangci-lint 1.62.2
1010
actionlint 1.6.12
1111
shellcheck 0.8.0
1212
scarb 2.6.5

integration-tests/common/common.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import (
1919
"github.com/smartcontractkit/chainlink-testing-framework/lib/k8s/environment"
2020
"github.com/smartcontractkit/chainlink-testing-framework/lib/k8s/pkg/helm/chainlink"
2121
mock_adapter "github.com/smartcontractkit/chainlink-testing-framework/lib/k8s/pkg/helm/mock-adapter"
22-
"github.com/smartcontractkit/chainlink/integration-tests/client"
22+
"github.com/smartcontractkit/chainlink/deployment/environment/nodeclient"
2323
"github.com/smartcontractkit/chainlink/integration-tests/docker/test_env"
2424
"github.com/smartcontractkit/chainlink/v2/core/services/job"
2525

@@ -197,8 +197,8 @@ func (c *Common) TearDownLocalEnvironment(t *testing.T) {
197197
log.Info().Msg("Tear down local stack complete.")
198198
}
199199

200-
func (c *Common) CreateNodeKeysBundle(nodes []*client.ChainlinkClient) ([]client.NodeKeysBundle, error) {
201-
nkb := make([]client.NodeKeysBundle, 0)
200+
func (c *Common) CreateNodeKeysBundle(nodes []*nodeclient.ChainlinkClient) ([]nodeclient.NodeKeysBundle, error) {
201+
nkb := make([]nodeclient.NodeKeysBundle, 0)
202202
for _, n := range nodes {
203203
p2pkeys, err := n.MustReadP2PKeys()
204204
if err != nil {
@@ -215,7 +215,7 @@ func (c *Common) CreateNodeKeysBundle(nodes []*client.ChainlinkClient) ([]client
215215
return nil, err
216216
}
217217

218-
nkb = append(nkb, client.NodeKeysBundle{
218+
nkb = append(nkb, nodeclient.NodeKeysBundle{
219219
PeerID: peerID,
220220
OCR2Key: *ocrKey,
221221
TXKey: *txKey,
@@ -227,7 +227,7 @@ func (c *Common) CreateNodeKeysBundle(nodes []*client.ChainlinkClient) ([]client
227227
// CreateJobsForContract Creates and sets up the boostrap jobs as well as OCR jobs
228228
func (c *Common) CreateJobsForContract(cc *ChainlinkClient, observationSource string, juelsPerFeeCoinSource string, ocrControllerAddress string, accountAddresses []string) error {
229229
// Define node[0] as bootstrap node
230-
cc.bootstrapPeers = []client.P2PData{
230+
cc.bootstrapPeers = []nodeclient.P2PData{
231231
{
232232
InternalIP: cc.ChainlinkNodes[0].InternalIP(),
233233
InternalPort: c.RPCDetails.P2PPort,
@@ -249,7 +249,7 @@ func (c *Common) CreateJobsForContract(cc *ChainlinkClient, observationSource st
249249
ContractConfigConfirmations: 1, // don't wait for confirmation on devnet
250250
}
251251
// Setting up bootstrap node
252-
jobSpec := &client.OCR2TaskJobSpec{
252+
jobSpec := &nodeclient.OCR2TaskJobSpec{
253253
Name: fmt.Sprintf("starknet-OCRv2-%s-%s", "bootstrap", uuid.New().String()),
254254
JobType: "bootstrap",
255255
OCR2OracleSpec: oracleSpec,
@@ -265,7 +265,7 @@ func (c *Common) CreateJobsForContract(cc *ChainlinkClient, observationSource st
265265
p2pBootstrappers = append(p2pBootstrappers, cc.bootstrapPeers[i].P2PV2Bootstrapper())
266266
}
267267

268-
sourceValueBridge := &client.BridgeTypeAttributes{
268+
sourceValueBridge := &nodeclient.BridgeTypeAttributes{
269269
Name: "mockserver-bridge",
270270
URL: c.RPCDetails.MockServerEndpoint + "/" + strings.TrimPrefix(c.RPCDetails.MockServerURL, "/"),
271271
}
@@ -299,7 +299,7 @@ func (c *Common) CreateJobsForContract(cc *ChainlinkClient, observationSource st
299299
},
300300
}
301301

302-
jobSpec = &client.OCR2TaskJobSpec{
302+
jobSpec = &nodeclient.OCR2TaskJobSpec{
303303
Name: fmt.Sprintf("starknet-OCRv2-%d-%s", nIdx, uuid.New().String()),
304304
JobType: "offchainreporting2",
305305
OCR2OracleSpec: oracleSpec,

integration-tests/common/test_common.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222

2323
"github.com/smartcontractkit/chainlink-common/pkg/logger"
2424
"github.com/smartcontractkit/chainlink-testing-framework/lib/logging"
25-
"github.com/smartcontractkit/chainlink/integration-tests/client"
25+
"github.com/smartcontractkit/chainlink/deployment/environment/nodeclient"
2626
test_env_integrations "github.com/smartcontractkit/chainlink/integration-tests/docker/test_env"
2727

2828
test_env_starknet "github.com/smartcontractkit/chainlink-starknet/integration-tests/docker/testenv"
@@ -42,7 +42,7 @@ var (
4242
type OCRv2TestState struct {
4343
Account *AccountDetails
4444
Clients *Clients
45-
ChainlinkNodesK8s []*client.ChainlinkK8sClient
45+
ChainlinkNodesK8s []*nodeclient.ChainlinkK8sClient
4646
Common *Common
4747
TestConfig *TestConfig
4848
Contracts *Contracts
@@ -78,10 +78,10 @@ type Contracts struct {
7878

7979
// ChainlinkClient core node configs
8080
type ChainlinkClient struct {
81-
NKeys []client.NodeKeysBundle
82-
ChainlinkNodes []*client.ChainlinkClient
83-
bTypeAttr *client.BridgeTypeAttributes
84-
bootstrapPeers []client.P2PData
81+
NKeys []nodeclient.NodeKeysBundle
82+
ChainlinkNodes []*nodeclient.ChainlinkClient
83+
bTypeAttr *nodeclient.BridgeTypeAttributes
84+
bootstrapPeers []nodeclient.P2PData
8585
AccountAddresses []string
8686
}
8787

@@ -203,7 +203,7 @@ func (m *OCRv2TestState) DeployCluster() {
203203
m.TestConfig.Resty = resty.New().SetBaseURL(m.Common.RPCDetails.RPCL2External)
204204

205205
if *m.Common.TestConfig.Common.InsideK8s {
206-
m.ChainlinkNodesK8s, m.TestConfig.err = client.ConnectChainlinkNodes(m.Common.Env)
206+
m.ChainlinkNodesK8s, m.TestConfig.err = nodeclient.ConnectChainlinkNodes(m.Common.Env)
207207
require.NoError(m.TestConfig.T, m.TestConfig.err)
208208
m.Clients.ChainlinkClient.ChainlinkNodes = m.GetChainlinkNodes()
209209
m.Clients.ChainlinkClient.NKeys, m.TestConfig.err = m.Common.CreateNodeKeysBundle(m.Clients.ChainlinkClient.ChainlinkNodes)
@@ -272,13 +272,13 @@ func (m *OCRv2TestState) SetUpNodes() {
272272
}
273273

274274
// GetNodeKeys Returns the node key bundles
275-
func (m *OCRv2TestState) GetNodeKeys() []client.NodeKeysBundle {
275+
func (m *OCRv2TestState) GetNodeKeys() []nodeclient.NodeKeysBundle {
276276
return m.Clients.ChainlinkClient.NKeys
277277
}
278278

279-
func (m *OCRv2TestState) GetChainlinkNodes() []*client.ChainlinkClient {
279+
func (m *OCRv2TestState) GetChainlinkNodes() []*nodeclient.ChainlinkClient {
280280
// retrieve client from K8s client
281-
var chainlinkNodes []*client.ChainlinkClient
281+
var chainlinkNodes []*nodeclient.ChainlinkClient
282282
for i := range m.ChainlinkNodesK8s {
283283
chainlinkNodes = append(chainlinkNodes, m.ChainlinkNodesK8s[i].ChainlinkClient)
284284
}
@@ -289,7 +289,7 @@ func (m *OCRv2TestState) GetChainlinkClient() *ChainlinkClient {
289289
return m.Clients.ChainlinkClient
290290
}
291291

292-
func (m *OCRv2TestState) SetBridgeTypeAttrs(attr *client.BridgeTypeAttributes) {
292+
func (m *OCRv2TestState) SetBridgeTypeAttrs(attr *nodeclient.BridgeTypeAttributes) {
293293
m.Clients.ChainlinkClient.bTypeAttr = attr
294294
}
295295

0 commit comments

Comments
 (0)