Skip to content

Commit

Permalink
integration-tests/common/client.go: remove deprecated chain creation …
Browse files Browse the repository at this point in the history
…code
  • Loading branch information
cfal committed Aug 11, 2023
1 parent 1adc98c commit b6aa6e0
Showing 1 changed file with 3 additions and 17 deletions.
20 changes: 3 additions & 17 deletions integration-tests/common/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,30 +31,15 @@ func NewChainlinkClient(env *environment.Environment, nodeName string, chainId s
if nodes == nil || len(nodes) == 0 {
return nil, errors.New("No connected nodes")
}

nodeKeys, _, err := client.CreateNodeKeysBundle(nodes, chainName, chainId)
if err != nil {
return nil, err
}

if nodeKeys == nil || len(nodeKeys) == 0 {
return nil, errors.New("No node keys")
}
for _, n := range nodes {
_, _, err = n.CreateCosmosChain(&client.CosmosChainAttributes{
ChainID: chainId,
Config: client.CosmosChainConfig{},
})
if err != nil {
return nil, err
}
_, _, err = n.CreateCosmosNode(&client.CosmosNodeAttributes{
Name: nodeName,
CosmosChainID: chainId,
TendermintURL: tendermintURL,
})
if err != nil {
return nil, err
}
}

return &ChainlinkClient{
ChainlinkNodes: nodes,
Expand Down Expand Up @@ -176,6 +161,7 @@ func (cc *ChainlinkClient) CreateJobsForContract(chainId, nodeName, p2pPort, moc
OCR2OracleSpec: oracleSpec,
ObservationSource: client.ObservationSourceSpecBridge(sourceValueBridge),
}

_, err = n.MustCreateJob(jobSpec)
if err != nil {
return err
Expand Down

0 comments on commit b6aa6e0

Please sign in to comment.