Skip to content

Instantly share code, notes, and snippets.

@ptisserand
Last active July 21, 2022 06:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ptisserand/851ba19db87377b660ff1749e050700e to your computer and use it in GitHub Desktop.
Save ptisserand/851ba19db87377b660ff1749e050700e to your computer and use it in GitHub Desktop.
starknet edu utils
#!/bin/bash
#
# Copy in the same directory as utils.py
# Set executable rights:
# $ chmod uog+x ./str_to_felt
# Run:
# $ ./str_to_felt HENRI
# 310400406089
#
UTILS_DIR=$(dirname $(readlink -f $0))
PYTHONPATH=${PYTHONPATH}:${UTILS_DIR} python -c "import utils; print(utils.str_to_felt(\"$1\"))"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment