Skip to content

Chore: validate --rpc and --private-key arguments for correctness#513

Open
casks-mutters wants to merge 1 commit intomainfrom
casks-mutters-patch-84978
Open

Chore: validate --rpc and --private-key arguments for correctness#513
casks-mutters wants to merge 1 commit intomainfrom
casks-mutters-patch-84978

Conversation

@casks-mutters
Copy link
Copy Markdown
Owner

Summary

The script currently does not perform validation on the --rpc argument (URL) or --private-key. If the RPC URL or private key is invalid, the script may fail with unclear errors.

Proposed Changes

  • Add validation to check if --rpc is a valid URL (using urllib or Web3).
  • Ensure the --private-key is in the correct hexadecimal format, and show an error message if it is invalid.

Motivation

  • Helps users avoid misconfiguration errors.
  • Improves error handling and user feedback.

## Summary

The script currently does not perform validation on the `--rpc` argument (URL) or `--private-key`. If the RPC URL or private key is invalid, the script may fail with unclear errors.

## Proposed Changes

- Add validation to check if `--rpc` is a valid URL (using `urllib` or `Web3`).
- Ensure the `--private-key` is in the correct hexadecimal format, and show an error message if it is invalid.

## Motivation

- Helps users avoid misconfiguration errors.  
- Improves error handling and user feedback.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant