Skip to content

Commit

Permalink
add nillion-devnet-stop command
Browse files Browse the repository at this point in the history
  • Loading branch information
oceans404 committed Mar 30, 2024
1 parent d7ff020 commit e9decec
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
"vercel": "yarn workspace @se-2/nextjs vercel",
"vercel:yolo": "yarn workspace @se-2/nextjs vercel:yolo",
"nillion": "yarn workspace @se-2/nillion nillion",
"nillion-devnet": "yarn workspace @se-2/nillion nillion-devnet"
"nillion-devnet": "yarn workspace @se-2/nillion nillion-devnet",
"nillion-devnet-stop": "yarn workspace @se-2/nillion nillion-devnet-stop"
},
"packageManager": "[email protected]",
"devDependencies": {
Expand Down
12 changes: 7 additions & 5 deletions packages/nillion/bootstrap-local-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ NILLION_CLI="nillion"
NILLION_CLI_COMMAND_USER_KEYGEN="user-key-gen"
NILLION_CLI_COMMAND_NODE_KEYGEN="node-key-gen"

echo $NILLION_DEVNET
# kill any other nillion-devnet processes
pkill -9 -f $NILLION_DEVNET

Expand Down Expand Up @@ -124,8 +123,11 @@ update_env "NEXT_PUBLIC_NILLION_CHAIN_ID" "$PAYMENTS_CHAIN" $ENV_TO_UPDATE
update_env "NEXT_PUBLIC_NILLION_WALLET_PRIVATE_KEY" "$WALLET_PRIVATE_KEY" $ENV_TO_UPDATE
update_env "NEXT_PUBLIC_NILLION_BOOTNODE_MULTIADDRESS" "$BOOT_MULTIADDR" $ENV_TO_UPDATE

echo "--------------------"
echo "ℹ️ Updated your $ENV_TO_UPDATE file configurations with variables: websocket, cluster id, keys, blockchain info"
echo "💻 Your Nillion local cluster is still running - process pid: $(pgrep -f $NILLION_DEVNET)"
echo "Running at process pid: $(pgrep -f $NILLION_DEVNET)"

echo "-------------------------------------------------------"
echo "-----------🦆 CONNECTED TO NILLION-DEVNET 🦆-----------"
echo "-------------------------------------------------------"

exit 0
echo "ℹ️ Your $ENV_TO_UPDATE file configurations were updated with nillion-devnet connection variables: websocket, cluster id, keys, blockchain info"
echo "💻 The Nillion devnet is still running behind the scenes; to spin down the Nillion devnet at any time, run 'yarn nillion-devnet-stop'"
3 changes: 2 additions & 1 deletion packages/nillion/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"version": "0.1.0",
"scripts": {
"nillion": "nillion",
"nillion-devnet": "sh ./bootstrap-local-env.sh"
"nillion-devnet": "sh ./bootstrap-local-env.sh",
"nillion-devnet-stop": "pkill -9 -f nillion-devnet"
}
}

0 comments on commit e9decec

Please sign in to comment.