Skip to content

Commit

Permalink
Merge pull request #503 from 0xPolygon/thiago/ulxly-private-key-error
Browse files Browse the repository at this point in the history
improve invalid --private-key error
  • Loading branch information
tclemos authored Feb 14, 2025
2 parents 2ad2149 + 3ee48a5 commit 2bc6c12
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/ulxly/ulxly.go
Original file line number Diff line number Diff line change
Expand Up @@ -1310,11 +1310,11 @@ func prepInputs(cmd *cobra.Command, args []string) error {
inputUlxlyArgs.gasLimit = &dryRunGasLimit
}
pvtKey := strings.TrimPrefix(*inputUlxlyArgs.privateKey, "0x")

privateKey, err := crypto.HexToECDSA(pvtKey)
if err != nil {
return err
return fmt.Errorf("invalid --%s: %w", ArgPrivateKey, err)
}

publicKey := privateKey.Public()

publicKeyECDSA, ok := publicKey.(*ecdsa.PublicKey)
Expand Down

0 comments on commit 2bc6c12

Please sign in to comment.