Skip to content

Instantly share code, notes, and snippets.

@GiveMeSomething
Created July 20, 2024 02:43
Show Gist options
  • Save GiveMeSomething/61092dc74d2392af3e8eadd9f71da99b to your computer and use it in GitHub Desktop.
Save GiveMeSomething/61092dc74d2392af3e8eadd9f71da99b to your computer and use it in GitHub Desktop.
#!/bin/bash
POSITIONAL_ARGS=()
while [[ $# -gt 0 ]]; do
case $1 in
-rpc|--rpc-url)
RPC_URL="$2"
shift
shift
;;
-pk|--private-key)
PRIVATE_KEY="$2"
shift
shift
;;
-f|--file-path)
CONTRACT_PATH="$2"
shift
shift
;;
-*|--*)
echo "Unknown option $1"
exit 1
esac
done
set -- "${POSITIONAL_ARGS[@]}" # restore positional parameters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment