Skip to content

Commit

Permalink
print tx info
Browse files Browse the repository at this point in the history
  • Loading branch information
shrimalmadhur committed Jul 9, 2024
1 parent fe1810e commit 28f9481
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
10 changes: 7 additions & 3 deletions pkg/common/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,17 @@ import (

func PrintRegistrationInfo(txHash string, operatorAddress common.Address, chainId *big.Int) {
fmt.Println(strings.Repeat("-", 100))
PrintTransactionInfo(txHash, chainId)

color.Blue("%s Operator Web App Link: %s\n", utils.EmojiInternet, getWebAppLink(operatorAddress, chainId))
fmt.Println(strings.Repeat("-", 100))
}

func PrintTransactionInfo(txHash string, chainId *big.Int) {
fmt.Printf("%s Chain ID: %s\n", utils.EmojiLink, chainId.String())
if len(txHash) > 0 {
fmt.Printf("%s Transaction Link: %s\n", utils.EmojiLink, GetTransactionLink(txHash, chainId))
}

color.Blue("%s Operator Web App Link: %s\n", utils.EmojiInternet, getWebAppLink(operatorAddress, chainId))
fmt.Println(strings.Repeat("-", 100))
}

func GetWallet(
Expand Down
4 changes: 2 additions & 2 deletions pkg/rewards/claim.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,8 @@ func Claim(cCtx *cli.Context, p utils.Prompter) error {
return eigenSdkUtils.WrapError("failed to process claim", err)
}

txLink := common.GetTransactionLink(receipt.TxHash.String(), config.ChainID)
logger.Infof("Claim transaction submitted successfully: %s", txLink)
logger.Infof("Claim transaction submitted successfully")
common.PrintTransactionInfo(receipt.TxHash.String(), config.ChainID)
} else {
solidityClaim := claimgen.FormatProofForSolidity(accounts.Root(), claim)
fmt.Println("------- Claim generated -------")
Expand Down
3 changes: 1 addition & 2 deletions pkg/rewards/setclaimer.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,8 @@ func SetClaimer(cCtx *cli.Context, p utils.Prompter) error {
config.EarnerAddress.Hex(),
)

common.PrintRegistrationInfo(
common.PrintTransactionInfo(
receipt.TxHash.String(),
config.EarnerAddress,
config.ChainID,
)

Expand Down

0 comments on commit 28f9481

Please sign in to comment.