Skip to content

Commit

Permalink
devsvcs-514: update debugging script (#14502)
Browse files Browse the repository at this point in the history
  • Loading branch information
FelixFan1992 authored Sep 20, 2024
1 parent 4f9ed64 commit ec585d4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions core/scripts/chaincli/handler/debug.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ import (
const (
ConditionTrigger uint8 = iota
LogTrigger
expectedTypeAndVersion = "KeeperRegistry 2.1.0"
expectedVersion21 = "KeeperRegistry 2.1.0"
expectedVersion23 = "AutomationRegistry 2.3.0"
)

var mercuryPacker = mercury.NewAbiPacker()
Expand Down Expand Up @@ -85,8 +86,8 @@ func (k *Keeper) Debug(ctx context.Context, args []string) {
if err != nil {
failCheckConfig("failed to get typeAndVersion: make sure your registry contract address and archive node are valid", err)
}
if typeAndVersion != expectedTypeAndVersion {
failCheckConfig(fmt.Sprintf("invalid registry contract: this command can only debug %s, got: %s", expectedTypeAndVersion, typeAndVersion), nil)
if typeAndVersion != expectedVersion21 && typeAndVersion != expectedVersion23 {
failCheckConfig(fmt.Sprintf("invalid registry contract: this command can only debug %s or %s, got: %s", expectedVersion21, expectedVersion23, typeAndVersion), nil)
}
// get upkeepID from command args
upkeepID := big.NewInt(0)
Expand Down

0 comments on commit ec585d4

Please sign in to comment.