Skip to content

Commit

Permalink
Extracts link deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
davidcauchi committed Nov 7, 2024
1 parent 6961ab1 commit e609c30
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions integration-tests/testsetups/ocr.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,8 @@ func (o *OCRSoakTest) Environment() *environment.Environment {

// Setup initializes the OCR Soak Test by setting up clients, funding nodes, and deploying OCR contracts.
func (o *OCRSoakTest) Setup(ocrTestConfig tt.OcrTestConfig) {
o.initializeClients(ocrTestConfig)
o.initializeClients()
o.deployLinkTokenContract(ocrTestConfig)
o.fundChainlinkNodes()

o.startingValue = 5
Expand All @@ -290,7 +291,7 @@ func (o *OCRSoakTest) Setup(ocrTestConfig tt.OcrTestConfig) {
}

// initializeClients sets up the Seth client, Chainlink nodes, and mock server.
func (o *OCRSoakTest) initializeClients(ocrTestConfig tt.OcrTestConfig) {
func (o *OCRSoakTest) initializeClients() {
sethClient, err := seth_utils.GetChainClient(o.Config, o.rpcNetwork)
require.NoError(o.t, err, "Error creating seth client")
o.seth = sethClient
Expand All @@ -301,8 +302,10 @@ func (o *OCRSoakTest) initializeClients(ocrTestConfig tt.OcrTestConfig) {

o.mockServer = ctf_client.ConnectMockServer(o.testEnvironment)
require.NoError(o.t, err, "Creating mockserver clients shouldn't fail")
}

linkContract, err := actions.LinkTokenContract(o.log, sethClient, ocrTestConfig.GetActiveOCRConfig())
func (o *OCRSoakTest) deployLinkTokenContract(ocrTestConfig tt.OcrTestConfig) {
linkContract, err := actions.LinkTokenContract(o.log, o.seth, ocrTestConfig.GetActiveOCRConfig())
require.NoError(o.t, err, "Error loading/deploying link token contract")
o.linkContract = linkContract
}
Expand Down

0 comments on commit e609c30

Please sign in to comment.