Skip to content

Commit

Permalink
Review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
kalverra committed Jun 25, 2024
1 parent ce190ba commit 3bb59ee
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions integration-tests/ccip-tests/contracts/contract_deployer.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ import (
"github.com/smartcontractkit/chainlink/v2/core/services/relay/evm"
)

func HaveRequiredContractVersions(requiredContractVersions map[Name]Version) error {
// MatchContractVersionsOrAbove checks if the current contract versions for the test match or exceed the provided contract versions
func MatchContractVersionsOrAbove(requiredContractVersions map[Name]Version) error {
for contractName, r := range requiredContractVersions {
required := r
if contractVersion, ok := VersionMap[contractName]; !ok {
Expand All @@ -76,7 +77,7 @@ func HaveRequiredContractVersions(requiredContractVersions map[Name]Version) err
// NeedTokenAdminRegistry checks if token admin registry is needed for the current version of ccip
// if the version is less than 1.5.0-dev, then token admin registry is not needed
func NeedTokenAdminRegistry() bool {
return HaveRequiredContractVersions(map[Name]Version{
return MatchContractVersionsOrAbove(map[Name]Version{
TokenPoolContract: V1_5_0_dev,
}) == nil
}
Expand Down
4 changes: 2 additions & 2 deletions integration-tests/ccip-tests/smoke/ccip_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ func TestSmokeCCIPSelfServeRateLimitOnRamp(t *testing.T) {

log := logging.GetTestLogger(t)
TestCfg := testsetups.NewCCIPTestConfig(t, log, testconfig.Smoke)
err := contracts.HaveRequiredContractVersions(map[contracts.Name]contracts.Version{
err := contracts.MatchContractVersionsOrAbove(map[contracts.Name]contracts.Version{
contracts.OffRampContract: contracts.V1_5_0_dev,
contracts.OnRampContract: contracts.V1_5_0_dev,
})
Expand Down Expand Up @@ -534,7 +534,7 @@ func TestSmokeCCIPSelfServeRateLimitOffRamp(t *testing.T) {

log := logging.GetTestLogger(t)
TestCfg := testsetups.NewCCIPTestConfig(t, log, testconfig.Smoke)
err := contracts.HaveRequiredContractVersions(map[contracts.Name]contracts.Version{
err := contracts.MatchContractVersionsOrAbove(map[contracts.Name]contracts.Version{
contracts.OffRampContract: contracts.V1_5_0_dev,
})
require.NoError(t, err, "Required contract versions not met")
Expand Down

0 comments on commit 3bb59ee

Please sign in to comment.