Eric 189c4afe3c
Update workshop scripts and instructions (#18)
* script updates for *nix

* workshop instructions update

* add "0x" before address output

* windows script

translation from AI -- not tested!

* Setting up for-codexers folder

* yes

---------

Co-authored-by: Ben <thatbenbierens@gmail.com>
2024-06-25 20:17:48 +10:00

13 lines
414 B
Bash
Executable File

#!/usr/bin/env bash
set -e
echo "Generating private key..."
response=$(curl -sX POST https://api.blockcypher.com/v1/eth/main/addrs)
echo -n "${response}" | grep -o '"private":.*"' | cut -d'"' -f4 > ./eth.key
address=$(echo -n "${response}" | grep -o '"address":.*"' | cut -d'"' -f4)
chmod 600 ./eth.key
echo " * your private key has been saved to ${PWD}/eth.key"
echo " * your ethereum address is 0x${address}"