Skip to content

Commit

Permalink
Exclude playground from source
Browse files Browse the repository at this point in the history
  • Loading branch information
lykhonis committed Dec 6, 2023
1 parent 4af3044 commit b5b408f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 186 deletions.
1 change: 1 addition & 0 deletions scripts/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/Playground.s.sol
185 changes: 0 additions & 185 deletions scripts/Playground.s.sol

This file was deleted.

13 changes: 12 additions & 1 deletion tools/playground.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ help() {
echo "Usage: $0 -t NETWORK [-b]"
echo -e "\t-t --target: Target network"
echo -e "\t-b --broadcast: Broadcast transactions to a network"
echo -e "\t-p --profile: Use Universal Page profile to transact on behalf"
echo -e "\t-h --help: Prints this message"
exit 1
}
Expand All @@ -26,6 +27,10 @@ while [ -n "$1" ]; do
BROADCAST=true
shift
;;
-p | --profile)
PROFILE=true
shift
;;
--)
# remaining options are captured as "$*"
shift
Expand Down Expand Up @@ -62,8 +67,14 @@ ARGS="--rpc-url ${RPC_URL}"
if [ -n "${PROFILE_CONTROLLER_PRIVATE_KEY}" ]; then
ARGS+=" --private-keys ${PROFILE_CONTROLLER_PRIVATE_KEY}"
fi
if [ -n "${OWNER_PRIVATE_KEY}" ]; then

# use profile's controller or fallback to hardware wallet
if [ "${PROFILE}" = true ]; then
ARGS+=" --ledger --hd-paths ${PROFILE_CONTROLLER_LEDGER_DERIVATION_PATH}"
elif [ -n "${OWNER_PRIVATE_KEY}" ]; then
ARGS+=" --private-keys ${OWNER_PRIVATE_KEY}"
elif [ -n "${OWNER_LEDGER_DERIVATION_PATH}" ]; then
ARGS+=" --ledger --hd-paths ${OWNER_LEDGER_DERIVATION_PATH}"
fi

# broadcast
Expand Down

0 comments on commit b5b408f

Please sign in to comment.