Skip to content

Commit

Permalink
get operator address from smart contract
Browse files Browse the repository at this point in the history
  • Loading branch information
shrimalmadhur committed Apr 25, 2024
1 parent c942910 commit 602fe25
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion node/plugin/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,17 @@ func pluginOps(ctx *cli.Context) {
}

if config.Operation == plugin.OperationListQuorums {
operatorAddress, err := tx.OperatorIDToAddress(context.Background(), operatorID)
if err != nil {
log.Printf("Error: failed to get operator address for operatorID: %x, error: %v", operatorID, err)
return
}
quorumIds, err := tx.GetRegisteredQuorumIdsForOperator(context.Background(), operatorID)
if err != nil {
log.Printf("Error: failed to get quorum(s) for operatorID: %x, operator address: %x, error: %v", operatorID, sk.Address, err)
return
}
log.Printf("Info: operator ID: %x, operator address: %x, current quorums: %v", operatorID, sk.Address, quorumIds)
log.Printf("Info: operator ID: %x, operator address: %x, current quorums: %v", operatorID, operatorAddress, quorumIds)
return
}

Expand Down

0 comments on commit 602fe25

Please sign in to comment.