Skip to content

Commit

Permalink
versions
Browse files Browse the repository at this point in the history
  • Loading branch information
FelixFan1992 committed Feb 19, 2024
1 parent 8ed9060 commit ba90f47
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions integration-tests/actions/automation_ocr_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
ocr2keepers30config "github.com/smartcontractkit/chainlink-automation/pkg/v3/config"
"github.com/smartcontractkit/chainlink-testing-framework/blockchain"
"github.com/smartcontractkit/chainlink-testing-framework/logging"

"github.com/smartcontractkit/chainlink/integration-tests/client"
"github.com/smartcontractkit/chainlink/integration-tests/contracts"
"github.com/smartcontractkit/chainlink/integration-tests/contracts/ethereum"
Expand Down Expand Up @@ -182,12 +183,13 @@ func CreateOCRKeeperJobs(
bootstrapP2PId := bootstrapP2PIds.Data[0].Attributes.PeerID

var contractVersion string
if registryVersion == ethereum.RegistryVersion_2_1 {
// TODO: use v2.1 for registry 2.2 for now until
if registryVersion == ethereum.RegistryVersion_2_1 || registryVersion == ethereum.RegistryVersion_2_2 {
contractVersion = "v2.1"
} else if registryVersion == ethereum.RegistryVersion_2_0 {
contractVersion = "v2.0"
} else {
require.FailNow(t, "v2.0 and v2.1 are the only supported versions")
require.FailNow(t, "v2.0, v2.1, and v2.2 are the only supported versions")
}

bootstrapSpec := &client.OCR2TaskJobSpec{
Expand Down
6 changes: 4 additions & 2 deletions integration-tests/actions/automation_ocr_helpers_local.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
ocr2keepers20config "github.com/smartcontractkit/chainlink-automation/pkg/v2/config"
ocr2keepers30config "github.com/smartcontractkit/chainlink-automation/pkg/v3/config"
"github.com/smartcontractkit/chainlink-testing-framework/blockchain"

"github.com/smartcontractkit/chainlink/integration-tests/client"
"github.com/smartcontractkit/chainlink/integration-tests/contracts"
"github.com/smartcontractkit/chainlink/integration-tests/contracts/ethereum"
Expand Down Expand Up @@ -184,12 +185,13 @@ func CreateOCRKeeperJobsLocal(
bootstrapP2PId := bootstrapP2PIds.Data[0].Attributes.PeerID

var contractVersion string
if registryVersion == ethereum.RegistryVersion_2_1 {
// TODO: use v2.1 for registry 2.2 for now until
if registryVersion == ethereum.RegistryVersion_2_1 || registryVersion == ethereum.RegistryVersion_2_2 {
contractVersion = "v2.1"
} else if registryVersion == ethereum.RegistryVersion_2_0 {
contractVersion = "v2.0"
} else {
return fmt.Errorf("v2.0 and v2.1 are the only supported versions")
return fmt.Errorf("v2.0, v2.1, and v2.2 are the only supported versions")
}

bootstrapSpec := &client.OCR2TaskJobSpec{
Expand Down

0 comments on commit ba90f47

Please sign in to comment.